Improve nix development shell
This commit is contained in:
parent
eef1f2caee
commit
d9d3438997
22
flake.nix
22
flake.nix
@ -10,11 +10,8 @@
|
|||||||
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)
|
||||||
defaultPackage = naersk-lib.buildPackage
|
|
||||||
{
|
|
||||||
src = ./.;
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
gtk4
|
gtk4
|
||||||
cairo
|
cairo
|
||||||
@ -23,7 +20,22 @@
|
|||||||
poppler
|
poppler
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
# Needed at runtime (on run system)
|
||||||
|
buildInputs = with pkgs; [ ];
|
||||||
|
in rec {
|
||||||
|
defaultPackage = naersk-lib.buildPackage {
|
||||||
|
src = ./.;
|
||||||
|
inherit buildInputs;
|
||||||
|
inherit nativeBuildInputs;
|
||||||
};
|
};
|
||||||
|
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