peerix/flake.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

2021-10-23 10:41:06 -04:00
{
description = "Peer2Peer Nix-Binary-Cache";
2021-10-29 08:29:52 -04:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils.url = "github:numtide/flake-utils";
mach-nix.url = "github:DavHau/mach-nix";
2021-10-23 10:41:06 -04:00
};
2021-10-29 08:29:52 -04:00
outputs = { self, nixpkgs, flake-utils, mach-nix, ... }: {
nixosModules.peerix = import ./module.nix;
} // flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in {
packages.peerix = mach-nix.lib.${system}.buildPythonApplication {
name = "peerix";
python = "python39";
src = ./.;
version = builtins.readFile ./VERSION;
requirements = builtins.readFile ./requirements.txt;
propagatedBuildInputs = with pkgs; [
nix
nix-serve
];
};
defaultPackage = self.packages.${system}.peerix;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
nix-serve
niv
(mach-nix.lib.${system}.mkPython {
python = "python39";
requirements = ''
${builtins.readFile ./requirements.txt}
ipython
'';
})
];
};
defaultApp = { type = "app"; program = "${self.packages.${system}.peerix}/bin/peerix"; };
});
2021-10-23 10:41:06 -04:00
}