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
33
flake.nix
33
flake.nix
|
@ -1,14 +1,29 @@
|
|||
{
|
||||
description = "restic-alarm";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
outputs = { self, nixpkgs } :
|
||||
let pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
in {
|
||||
defaultPackage.x86_64-linux = pkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "restic-alarm";
|
||||
version = "0.0.1";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
inputs = {
|
||||
cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
|
||||
flake-utils.follows = "cargo2nix/flake-utils";
|
||||
nixpkgs.follows = "cargo2nix/nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs: with inputs;
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
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