dotfiles

feat(nix): add jpm with overlay patch

patched jpm with overlay to fix janet path issue (nixpkgs#373858)

Signed-off-by: Seongmin Lee <boltlessengineer@proton.me>

+34 -1
+5 -1
nix/flake.nix
··· 17 17 }: 18 18 let 19 19 system = "aarch64-darwin"; 20 - pkgs = nixpkgs.legacyPackages.${system}; 20 + pkgs = import nixpkgs { 21 + inherit system; 22 + overlays = [ (import ./overlays/jpm.nix) ]; 23 + }; 21 24 pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; 22 25 in 23 26 { ··· 47 50 pkgs.gh 48 51 pkgs.hello 49 52 pkgs.janet 53 + pkgs.jpm 50 54 pkgs.meld 51 55 pkgs.nodejs_24 52 56 pkgs.ripgrep
+29
nix/overlays/jpm.nix
··· 1 + self: super: { 2 + jpm = super.jpm.overrideAttrs (oldAttrs: let 3 + platformFiles = { 4 + aarch64-darwin = "macos_config.janet"; 5 + aarch64-linux = "linux_config.janet"; 6 + x86_64-darwin = "macos_config.janet"; 7 + x86_64-linux = "linux_config.janet"; 8 + }; 9 + 10 + platformFile = platformFiles.${super.stdenv.hostPlatform.system}; 11 + in { 12 + installPhase = '' 13 + runHook preInstall 14 + 15 + mkdir -p $out/{lib/janet,share/man/man1} 16 + 17 + janet bootstrap.janet configs/${platformFile} 18 + 19 + substituteInPlace $out/lib/janet/jpm/default-config.janet \ 20 + --replace-fail $out ${super.janet} 21 + 22 + runHook postInstall 23 + ''; 24 + installCheckPhase = '' 25 + $out/bin/jpm help 26 + $out/bin/jpm show-paths 27 + ''; 28 + }); 29 + }