{ pkgs }: pkgs.stdenv.mkDerivation rec { pname = "yolk"; version = "0.3.6"; # nix-hash --sri --type sha256 [file] hash = "sha256-gfTlMr0QKFm34qI/0JxV3q4XqCpSUHmymaq6GrpCsFA="; manHash = "sha256-uuzIxrXk0NNcacJr7NVo0oWmU85EQH5P0mWuL8s9zA0="; src = pkgs.fetchurl { url = "https://github.com/elkowar/yolk/releases/download/v${version}/yolk_dots-x86_64-unknown-linux-musl.tar.xz"; hash = "${hash}"; }; manSource = pkgs.fetchurl { url = "https://github.com/elkowar/yolk/releases/download/v${version}/yolk.man"; hash = "${manHash}"; }; buildInputs = [ pkgs.makeWrapper pkgs.nodejs ]; nativeBuildInputs = [ pkgs.pkg-config pkgs.xz ]; unpackPhase = '' tar -xf ${src} ''; installPhase = '' mkdir -p $out/bin cp yolk_dots-x86_64-unknown-linux-musl/yolk $out/bin/yolk chmod +x $out/bin/yolk # install man page mkdir -p $out/share/man/man1 cp ${manSource} $out/share/man/man1/yolk.1 ''; meta = with pkgs.lib; { description = "Painfree Templated Dotfile Management"; homepage = "https://github.com/elkowar/yolk"; license = licenses.mit; maintainers = with maintainers; [ Katzennkralle ]; platforms = platforms.linux; }; }