garbage/flake.nix

29 lines
861 B
Nix
Raw Normal View History

2021-09-05 09:13:41 +00:00
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem ["x86_64-linux"] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
garbageProj = import ./Cargo.nix { inherit pkgs; };
2021-09-06 03:40:22 +00:00
garbageProjDebug = import ./Cargo.nix { inherit pkgs; release = false; };
2021-09-05 09:47:34 +00:00
garbage = pkgs.lib.recursiveUpdate garbageProj.rootCrate.build {
2021-09-05 09:13:41 +00:00
meta = {
description = "CLI tool to interact with the FreeDesktop trash API.";
mainProgram = "garbage";
};
};
flakePkgs = {
inherit garbage;
2021-09-06 03:40:22 +00:00
tests = pkgs.callPackage ./tests { garbage = garbageProjDebug.rootCrate.build; };
2021-09-05 09:13:41 +00:00
};
in
rec {
packages = flake-utils.lib.flattenTree flakePkgs;
2021-09-05 09:47:34 +00:00
checks = { tests = packages.tests; };
2021-09-05 09:13:41 +00:00
defaultPackage = flakePkgs.garbage;
});
}