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;
|
2021-10-31 21:18:12 -04:00
|
|
|
overlay = import ./overlay.nix { inherit self; };
|
2021-10-29 08:29:52 -04:00
|
|
|
} // flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system}; in {
|
|
|
|
packages.peerix = mach-nix.lib.${system}.buildPythonApplication {
|
2021-10-31 21:32:18 -04:00
|
|
|
pname = "peerix";
|
2021-10-29 08:29:52 -04:00
|
|
|
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
|
|
|
}
|