-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
67 lines (62 loc) · 1.77 KB
/
flake.nix
File metadata and controls
67 lines (62 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
description = "Radicle Desktop App";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
heartwood = {
url = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5?ref=refs/tags/releases/1.7.1";
};
};
outputs = {
self,
nixpkgs,
flake-utils,
rust-overlay,
heartwood,
...
}:
(flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
(import rust-overlay)
];
};
in {
checks = {
radicle-desktop = self.packages.${system}.radicle-desktop.overrideAttrs ({ doCheck = true; });
};
devShells.default = pkgs.mkShell {
name = "radicle-desktop-env";
inputsFrom = [ self.checks.${system}.radicle-desktop ];
nativeBuildInputs = with pkgs; [
cargo-watch
cargo-nextest
ripgrep
rust-analyzer
];
env = self.checks.${system}.radicle-desktop.env // {
};
};
packages = {
default = self.packages.${system}.radicle-desktop;
twemoji-assets = pkgs.fetchFromGitHub {
owner = "twitter";
repo = "twemoji";
rev = "v14.0.2";
hash = "sha256-YoOnZ5uVukzi/6bLi22Y8U5TpplPzB7ji42l+/ys5xI=";
};
radicle-desktop = pkgs.callPackage ./nix/radicle-desktop.nix {
inherit heartwood;
inherit (self.packages.${system}) twemoji-assets;
}
// (if self ? rev || self ? dirtyRev then {
GIT_HEAD = if self ? rev then self.rev else self.dirtyRev;
} else {});
};
}));
}