34 lines
780 B
Nix
34 lines
780 B
Nix
{
|
|
pkgs ? (
|
|
let
|
|
inherit (builtins) fetchTree fromJSON readFile;
|
|
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
|
|
in
|
|
import (fetchTree nixpkgs.locked) {
|
|
overlays = [
|
|
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
|
];
|
|
}
|
|
),
|
|
buildGoApplication ? pkgs.buildGoApplication,
|
|
}:
|
|
|
|
buildGoApplication {
|
|
pname = "goGoFetch";
|
|
version = "1.0";
|
|
pwd = ./.;
|
|
src = ./.;
|
|
modules = ./gomod2nix.toml;
|
|
|
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
buildInputs = [ pkgs.chafa ];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/gogofetch/assets
|
|
cp -r assets/*.png $out/share/gogofetch/assets/
|
|
|
|
wrapProgram $out/bin/goGoFetch \
|
|
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.chafa ]}
|
|
'';
|
|
}
|