nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 72 lines 1.5 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 python3, 5 stdenv, 6 strip-nondeterminism, 7 zip, 8}: 9 10let 11 version = "1.1.0"; 12 sha256 = "sha256-563xOz63vto19yuaHtReV1dSw6BgNf+CLtS3lrPnaoc="; 13 14 pname = "pridefetch"; 15 src = fetchFromGitHub { 16 owner = "SpyHoodle"; 17 repo = "pridefetch"; 18 rev = "v" + version; 19 inherit sha256; 20 }; 21in 22 23stdenv.mkDerivation { 24 inherit pname version src; 25 26 nativeBuildInputs = [ 27 strip-nondeterminism 28 zip 29 ]; 30 31 buildInputs = [ 32 (python3.withPackages ( 33 pythonPackages: with pythonPackages; [ 34 distro 35 ] 36 )) 37 ]; 38 39 buildPhase = '' 40 runHook preBuild 41 pushd src 42 zip -r ../pridefetch.zip ./* 43 strip-nondeterminism ../pridefetch.zip 44 popd 45 echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch 46 rm pridefetch.zip 47 runHook postBuild 48 ''; 49 50 installPhase = '' 51 runHook preInstall 52 mkdir -p $out/bin 53 mv pridefetch $out/bin/pridefetch 54 chmod +x $out/bin/pridefetch 55 runHook postInstall 56 ''; 57 58 meta = { 59 description = "Print out system statistics with pride flags"; 60 longDescription = '' 61 Pridefetch prints your system statistics (similarly to neofetch, screenfetch or pfetch) along with a pride flag. 62 The flag which is printed is configurable, as well as the width of the output. 63 ''; 64 homepage = "https://github.com/SpyHoodle/pridefetch"; 65 license = lib.licenses.mit; 66 maintainers = [ 67 lib.maintainers.minion3665 68 ]; 69 platforms = lib.platforms.all; 70 mainProgram = "pridefetch"; 71 }; 72}