2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 05:33:23 +00:00
nixpkgs/pkgs/tools/misc/pridefetch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.5 KiB
Nix
Raw Normal View History

2023-06-10 04:31:52 +00:00
{ lib
, fetchFromGitHub
, python3
, stdenv
2023-06-10 04:43:00 +00:00
, strip-nondeterminism
2023-06-10 04:31:52 +00:00
, zip
}:
let
2022-10-12 05:13:36 +00:00
version = "1.1.0";
sha256 = "sha256-563xOz63vto19yuaHtReV1dSw6BgNf+CLtS3lrPnaoc=";
pname = "pridefetch";
src = fetchFromGitHub {
owner = "SpyHoodle";
repo = pname;
rev = "v" + version;
inherit sha256;
};
2023-06-10 04:31:52 +00:00
in
stdenv.mkDerivation {
inherit pname version src;
2023-06-10 04:31:52 +00:00
nativeBuildInputs = [
2023-06-10 04:43:00 +00:00
strip-nondeterminism
zip
];
2023-06-10 04:31:52 +00:00
buildInputs = [
(python3.withPackages (pythonPackages: with pythonPackages; [
distro
]))
];
2023-06-10 04:31:52 +00:00
buildPhase = ''
runHook preBuild
pushd src
zip -r ../pridefetch.zip ./*
2023-06-10 04:43:00 +00:00
strip-nondeterminism ../pridefetch.zip
popd
echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch
rm pridefetch.zip
runHook postBuild
'';
2023-06-10 04:31:52 +00:00
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv pridefetch $out/bin/pridefetch
chmod +x $out/bin/pridefetch
runHook postInstall
'';
2023-06-10 04:31:52 +00:00
meta = with lib; {
description = "Print out system statistics with pride flags";
longDescription = ''
Pridefetch prints your system statistics (similarly to neofetch, screenfetch or pfetch) along with a pride flag.
The flag which is printed is configurable, as well as the width of the output.
'';
homepage = "https://github.com/SpyHoodle/pridefetch";
license = licenses.mit;
maintainers = [
maintainers.minion3665
];
platforms = platforms.all;
2023-11-27 01:17:53 +00:00
mainProgram = "pridefetch";
};
}