Merge branch 'master' into default

This commit is contained in:
Skyler 2022-05-22 21:26:31 +01:00 committed by GitHub
commit 7207ce9e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 19 deletions

View File

@ -45,6 +45,7 @@ mv pridefetch /usr/bin/
## Running on NixOS
#### If your system supports flakes
> ⚠ Note: This has only been tried on x86_64-linux; while it may work if your system is something different I have only tested it
You can run pridefetch quickly
```bash

View File

@ -4,26 +4,30 @@
outputs = { self, nixpkgs }: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
forAllSystems = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.supported.hydra (system: f system);
in rec {
packages."${system}".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
'';
};
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
'';
};
});
defaultPackage."${system}" = packages."${system}".pridefetch;
defaultPackage = forAllSystems (system: self.packages.${system}.pridefetch);
};
}