-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
70 lines (65 loc) · 1.95 KB
/
flake.nix
File metadata and controls
70 lines (65 loc) · 1.95 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
68
69
70
{
description = "Rust + GTK4 + SQLCipher dev environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rust = pkgs.rust-bin.stable.latest.default;
nativeBuildInputs = with pkgs; [
pkg-config
glib
blueprint-compiler
librsvg
makeWrapper
];
buildInputs = with pkgs; [
rust
gtk4
sqlcipher
glib
cairo
gdk-pixbuf
pango
atk
libsoup_3
webkitgtk_6_0
libshumate
libadwaita
openssl
blueprint-compiler
librsvg
gsettings-desktop-schemas
];
in {
devShells.default = pkgs.mkShell {
inherit nativeBuildInputs buildInputs;
shellHook = ''
echo ${pkgs.librsvg}
'';
};
packages.default = pkgs.rustPlatform.buildRustPackage (finalAttrs: {
inherit nativeBuildInputs buildInputs;
pname = "opensignal";
version = "1.0.0";
src = ./.;
cargoHash = "sha256-/0m5q0VIMZikaniYEk52byc+ToJxiwiJefr1kS2Nl5M=";
buildFeatures = [ "binary" ];
cargoBuildFlags = [ "--bin" "opensignal" ];
cargoInstallFlags = [ "--bin" "opensignal" ];
doCheck = false;
postInstall = ''
cp -r $src/icons $out/bin/icons
wrapProgram $out/bin/opensignal --set LD_LIBRARY_PATH ${pkgs.librsvg}/lib --set GDK_PIXBUF_MODULE_FILE ${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
'';
});
}
);
}