add Cargo.nix & update flake.nix accordingly
This commit is contained in:
parent
35cb6c2267
commit
fad6b02297
2 changed files with 3699 additions and 11 deletions
37
flake.nix
37
flake.nix
|
@ -1,14 +1,29 @@
|
||||||
{
|
{
|
||||||
description = "restic-alarm";
|
description = "restic-alarm";
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
inputs = {
|
||||||
outputs = { self, nixpkgs } :
|
cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
|
||||||
let pkgs = import nixpkgs { system = "x86_64-linux"; };
|
flake-utils.follows = "cargo2nix/flake-utils";
|
||||||
in {
|
nixpkgs.follows = "cargo2nix/nixpkgs";
|
||||||
defaultPackage.x86_64-linux = pkgs.rustPlatform.buildRustPackage rec {
|
};
|
||||||
pname = "restic-alarm";
|
|
||||||
version = "0.0.1";
|
outputs = inputs: with inputs;
|
||||||
src = ./.;
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
let
|
||||||
};
|
pkgs = import nixpkgs {
|
||||||
};
|
inherit system;
|
||||||
|
overlays = [cargo2nix.overlays.default];
|
||||||
|
};
|
||||||
|
|
||||||
|
rustPkgs = pkgs.rustBuilder.makePackageSet {
|
||||||
|
rustVersion = "1.75.0";
|
||||||
|
packageFun = import ./Cargo.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
in rec {
|
||||||
|
packages = {
|
||||||
|
restic-alarm = (rustPkgs.workspace.restic-alarm {});
|
||||||
|
default = packages.restic-alarm;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue