Improve nix development shell
This commit is contained in:
parent
608fc7c386
commit
a9550e61fc
32
flake.nix
32
flake.nix
@ -10,18 +10,32 @@
|
|||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
naersk-lib = pkgs.callPackage naersk { };
|
naersk-lib = pkgs.callPackage naersk { };
|
||||||
in {
|
|
||||||
|
# Needed at compile time (on build system)
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
gtk4
|
||||||
|
cairo
|
||||||
|
glib
|
||||||
|
pkg-config
|
||||||
|
poppler
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
# Needed at runtime (on run system)
|
||||||
|
buildInputs = with pkgs; [ ];
|
||||||
|
in rec {
|
||||||
defaultPackage = naersk-lib.buildPackage {
|
defaultPackage = naersk-lib.buildPackage {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
nativeBuildInputs = with pkgs; [
|
inherit buildInputs;
|
||||||
gtk4
|
inherit nativeBuildInputs;
|
||||||
cairo
|
|
||||||
glib
|
|
||||||
pkg-config
|
|
||||||
poppler
|
|
||||||
wrapGAppsHook
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
devShell = with pkgs;
|
||||||
|
mkShell {
|
||||||
|
buildInputs =
|
||||||
|
[ cargo rustc rustfmt pre-commit rustPackages.clippy ];
|
||||||
|
# Without inheriting nativeBuildinputs, cargo build will fail but that is good since we want to use only nix build
|
||||||
|
# inherit nativeBuildInputs;
|
||||||
|
|
||||||
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user