at 23.11-beta 38 lines 917 B view raw
1{ stdenv, lib, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 pname = "starfetch"; 5 version = "0.0.4"; 6 7 src = fetchFromGitHub { 8 owner = "Haruno19"; 9 repo = "starfetch"; 10 rev = version; 11 sha256 = "sha256-I2M/FlLRkGtD2+GcK1l5+vFsb5tCb4T3UJTPxRx68Ww="; 12 }; 13 14 postPatch = '' 15 substituteInPlace src/starfetch.cpp --replace /usr/local/ $out/ 16 '' + lib.optionalString stdenv.cc.isClang '' 17 substituteInPlace makefile --replace g++ clang++ 18 ''; 19 20 installPhase = '' 21 runHook preInstall 22 23 mkdir -p $out/bin 24 mkdir -p $out/share/starfetch 25 cp starfetch $out/bin/ 26 cp -r res/* $out/share/starfetch/ 27 28 runHook postInstall 29 ''; 30 31 meta = with lib; { 32 description = "CLI star constellations displayer"; 33 homepage = "https://github.com/Haruno19/starfetch"; 34 license = licenses.gpl3Plus; 35 platforms = platforms.all; 36 maintainers = with maintainers; [ annaaurora ]; 37 }; 38}