2022-04-06 14:30:45 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "starfetch";
|
2022-12-25 23:44:55 +00:00
|
|
|
version = "0.0.4";
|
2022-04-06 14:30:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Haruno19";
|
|
|
|
repo = "starfetch";
|
|
|
|
rev = version;
|
2022-12-25 23:44:55 +00:00
|
|
|
sha256 = "sha256-I2M/FlLRkGtD2+GcK1l5+vFsb5tCb4T3UJTPxRx68Ww=";
|
2022-04-06 14:30:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/starfetch.cpp --replace /usr/local/ $out/
|
2022-10-23 04:21:43 +00:00
|
|
|
'' + lib.optionalString stdenv.cc.isClang ''
|
|
|
|
substituteInPlace makefile --replace g++ clang++
|
2022-04-06 14:30:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/starfetch
|
|
|
|
cp starfetch $out/bin/
|
|
|
|
cp -r res/* $out/share/starfetch/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI star constellations displayer";
|
|
|
|
homepage = "https://github.com/Haruno19/starfetch";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.all;
|
2022-07-19 23:47:30 +00:00
|
|
|
maintainers = with maintainers; [ annaaurora ];
|
2022-04-06 14:30:45 +00:00
|
|
|
};
|
|
|
|
}
|