nix: setup dev shell

This commit is contained in:
Darksome 2023-11-12 17:30:41 +04:00
parent 9a04fa2abd
commit 62b81347a7
4 changed files with 29 additions and 141 deletions

View file

@ -3,9 +3,16 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
parts.url = "github:hercules-ci/flake-parts";
parts.inputs.nixpkgs-lib.follows = "nixpkgs";
crane.url = "github:ipetkov/crane";
crane.inputs.nixpkgs.follows = "nixpkgs";
rust.url = "github:oxalica/rust-overlay";
rust.inputs.nixpkgs.follows = "nixpkgs";
nix-filter.url = "github:numtide/nix-filter";
};
@ -68,9 +75,11 @@
checks.cosmic-comp = cosmic-comp;
packages.default = cosmic-comp;
devShells.default = pkgs.mkShell {
# Should there be packages here or use Nix purely for CI?
devShells.default = craneLib.devShell {
LD_LIBRARY_PATH = lib.makeLibraryPath (__concatMap (d: d.runtimeDependencies) (__attrValues self'.checks));
# include build inputs
inputsFrom = [cosmic-comp];
};
};
};