garbage/flake.nix
2021-09-05 04:47:34 -05:00

27 lines
756 B
Nix

{
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; };
garbage = pkgs.lib.recursiveUpdate garbageProj.rootCrate.build {
meta = {
description = "CLI tool to interact with the FreeDesktop trash API.";
mainProgram = "garbage";
};
};
flakePkgs = {
inherit garbage;
tests = pkgs.callPackage ./tests { inherit garbage; };
};
in
rec {
packages = flake-utils.lib.flattenTree flakePkgs;
checks = { tests = packages.tests; };
defaultPackage = flakePkgs.garbage;
});
}