nix: add devshell

This commit is contained in:
Johannes Jöns 2024-07-06 09:42:54 +02:00
parent 264ce36286
commit b361cdfcc7
4 changed files with 20 additions and 2 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

5
.gitignore vendored
View file

@ -2,5 +2,6 @@
# Added by cargo # Added by cargo
/target target
/result result
.direnv

View file

@ -10,5 +10,11 @@
inherit system inputs; inherit system inputs;
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
}); });
devShells = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: {
default = import ./shell.nix {
inherit system inputs;
pkgs = nixpkgs.legacyPackages.${system};
};
});
}; };
} }

10
shell.nix Normal file
View file

@ -0,0 +1,10 @@
{
pkgs,
system,
inputs,
}:
pkgs.mkShell {
packages = with pkgs; [];
inputsFrom = with inputs.self.legacyPackages.${system}; [ backend web native ];
}