PrideFetch/flake.nix

34 lines
912 B
Nix
Raw Normal View History

2022-05-22 20:21:50 +01:00
{
description = "A flake to run pridefetch";
outputs = { self, nixpkgs }: let
system = "x86_64-linux";
2022-05-22 21:00:40 +01:00
forAllSystems = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.supported.hydra (system: f system);
2022-05-22 20:21:50 +01:00
in rec {
2022-05-22 21:00:40 +01:00
packages = forAllSystems (system: let
pkgs = import nixpkgs {
inherit system;
};
in {
pridefetch = pkgs.stdenv.mkDerivation {
name = "pridefetch";
buildInputs = [
(pkgs.python39.withPackages (pythonPackages: with pythonPackages; [
distro
]))
];
unpackPhase = "true";
installPhase = ''
mkdir -p $out/bin
cp ${./pridefetch} $out/bin/pridefetch
cp ${./packages.py} $out/bin/packages.py
chmod +x $out/bin/pridefetch
'';
};
});
2022-05-22 20:21:50 +01:00
2022-05-22 21:00:40 +01:00
defaultPackage = forAllSystems (system: self.packages.${system}.pridefetch);
2022-05-22 20:21:50 +01:00
};
}