From 5af036b25b3c4c30eb37e63154ab725a51ab71d9 Mon Sep 17 00:00:00 2001 From: arunoruto Date: Sun, 3 Nov 2024 22:04:46 +0100 Subject: [PATCH] Update isis (for now) --- modules/home-manager/server/shell/nushell.nix | 13 +++++- pkgs/default.nix | 2 +- pkgs/isis/package.nix | 40 ++++++++++++------- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/modules/home-manager/server/shell/nushell.nix b/modules/home-manager/server/shell/nushell.nix index e3877e8..c75c972 100644 --- a/modules/home-manager/server/shell/nushell.nix +++ b/modules/home-manager/server/shell/nushell.nix @@ -2,8 +2,9 @@ config, lib, pkgs, + osConfig, ... -}: +}@args: { options.nushell.enable = lib.mkEnableOption "Configure nushell for you"; @@ -116,7 +117,15 @@ '' + lib.optionalString config.skim.enable '' plugin add ${lib.getExe pkgs.unstable.nushellPlugins.skim} - ''; + '' + + ( + let + path = osConfig.services.ssh-tpm-agent.userProxyPath; + in + lib.optionalString ((args ? nixosConfig) && (path != "")) '' + $env.SSH_AUTH_SOCK = ($env.XDG_RUNTIME_DIR + '/ssh-tpm-agent.sock') + '' + ); }; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index 4f059bc..ade3581 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -5,5 +5,5 @@ pkgs: { candy-icons = pkgs.callPackage ./candy-icons/package.nix { }; mstm = pkgs.callPackage ./mstm/parallel.nix { }; zen-browser = pkgs.callPackage ./zen-browser/package.nix { }; - # isis = pkgs.callPackage ./isis/package.nix { }; + isis = pkgs.callPackage ./isis/package.nix { }; } diff --git a/pkgs/isis/package.nix b/pkgs/isis/package.nix index 88326b2..4c0078d 100644 --- a/pkgs/isis/package.nix +++ b/pkgs/isis/package.nix @@ -1,31 +1,33 @@ { lib, - stdenvNoCC, - # fetchFromGitHub, - conda, + stdenv, + makeWrapper, + + # runtime + xercesc, }: let pname = "isis"; version = "8.3.0"; in -stdenvNoCC.mkDerivation { +stdenv.mkDerivation { inherit pname; inherit version; - # src = fetchFromGitHub { - # owner = "DOI-USGS"; - # repo = pname; - # rev = version; - # hash = "sha256-84DuZhzwqdE1ZFv5ytg4XxveuHXacFelYC0ERlExLS4="; - # }; src = builtins.fetchTarball { url = "https://anaconda.org/usgs-astrogeology/${pname}/${version}/download/linux-64/${pname}-${version}-0.tar.bz2"; - sha256 = "sha256:0l910hqwrnd6c9zyc031x2iw1ji07amhs82g0c67lyxcj59nk1k7"; + sha256 = "sha256:0b0wlb9z9p5liws38bhbjvjpb2603355bwbkgv5x81p7pyf4wkdi"; }; + buildInputs = [ + xercesc + ]; + nativeBuildInputs = [ - conda + # conda + # xercesc + makeWrapper ]; buildPhase = '' @@ -35,13 +37,21 @@ stdenvNoCC.mkDerivation { installPhase = '' # runHook preInstall - # mkdir -p $out/share/icons/candy-icons - # cp -r . $out/share/icons/candy-icons + mkdir -p $out + cp -r . $out # gtk-update-icon-cache $out/share/icons/candy-icons - # runHook postInstall + runHook postInstall ''; + postInstallPhase = '' + patchelf --set-rpath "${lib.makeLibraryPath [ xercesc ]}" $out/bin/isis2ascii + ''; + + # extraWrapProgramArgs = '' + # --prefix LD_LIBRARY_PATH : $out/lib : ${lib.makeLibraryPath [ xercesc ]} + # ''; + meta = with lib; { homepage = "https://isis.astrogeology.usgs.gov"; description = "A digital image processing software package to manipulate imagery collected by current and past NASA and International planetary missions";