mirror of
https://codeberg.org/demostf/backup.git
synced 2026-06-03 09:54:18 +02:00
basic flake
This commit is contained in:
parent
afc42a9b9e
commit
208f85644f
3 changed files with 105 additions and 1 deletions
33
flake.nix
Normal file
33
flake.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, naersk }:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
naersk-lib = naersk.lib."${system}";
|
||||
in
|
||||
rec {
|
||||
# `nix build`
|
||||
packages.demobackup = naersk-lib.buildPackage {
|
||||
pname = "demobackup";
|
||||
root = ./.;
|
||||
};
|
||||
defaultPackage = packages.demobackup;
|
||||
|
||||
# `nix run`
|
||||
apps.hello-world = flake-utils.lib.mkApp {
|
||||
drv = packages.demobackup;
|
||||
};
|
||||
defaultApp = apps.demobackup;
|
||||
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [ rustc cargo ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue