From 821fca68d9f4697295c11a4844e0ca6f8a815c93 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sat, 23 Mar 2024 20:13:16 +0100 Subject: [PATCH] Install my custom script. --- home-manager/home.nix | 1 + home-manager/modules/scripts.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 home-manager/modules/scripts.nix diff --git a/home-manager/home.nix b/home-manager/home.nix index 6091b1a..59f4a19 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -67,6 +67,7 @@ pandoc # I wish I didn't have to use it (nerdfonts.override { fonts = [ "CascadiaCode" ]; }) # Best font (retroarch.override { cores = with libretro; [ snes9x mgba ]; }) + (callPackage ./modules/scripts.nix { inherit pkgs; }) # My scripts ]; # Environmental variables I can't live without diff --git a/home-manager/modules/scripts.nix b/home-manager/modules/scripts.nix new file mode 100644 index 0000000..df48f83 --- /dev/null +++ b/home-manager/modules/scripts.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +with pkgs; +stdenv.mkDerivation { + pname = "blog"; + version = "1"; + src = ./scripts/blog; + nativeBuildInputs = [ makeWrapper ]; + installPhase = '' + mkdir -p $out/bin + mv blog $out/bin/blog + + patchShebangs $out/bin/blog + wrapProgram $out/bin/blog \ + --prefix PATH : ${lib.makeBinPath [ hugo rsync git ]} + ''; +}