From f94a507db4a0bfdcdec71c4f78b5e99bf2cf431b Mon Sep 17 00:00:00 2001 From: 0qln <0qln@proton.me> Date: Wed, 12 Nov 2025 00:33:56 +0100 Subject: [PATCH] convert custom script into overlay --- flake.nix | 11 +++++++++++ justfile | 2 +- nuget-to-json => nuget-to-json.sh | 6 +++--- 3 files changed, 15 insertions(+), 4 deletions(-) rename nuget-to-json => nuget-to-json.sh (84%) diff --git a/flake.nix b/flake.nix index 5accef8..9ce1601 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,17 @@ system, ... }: rec { + _module.args.pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + (_final: prev: { + nuget-to-json = prev.nuget-to-json.overrideAttrs (old: { + src = ./nuget-to-json.sh; + }); + }) + ]; + config = {}; + }; # Per-system attributes can be defined here. The self' and inputs' # module parameters provide easy access to attributes of the same # system. diff --git a/justfile b/justfile index 7ed7f33..ecd80c7 100644 --- a/justfile +++ b/justfile @@ -4,5 +4,5 @@ setup-nuget nuget-pat: run project: dotnet restore --packages out - ./nuget-to-json out > deps.json + nuget-to-json out > deps.json nix run .#{{project}} diff --git a/nuget-to-json b/nuget-to-json.sh similarity index 84% rename from nuget-to-json rename to nuget-to-json.sh index 4b01cbd..12ca924 100755 --- a/nuget-to-json +++ b/nuget-to-json.sh @@ -1,11 +1,11 @@ -#!/nix/store/ciarnmsx8lvsrmdbjddpmx0pqjrm8imb-bash-5.3p3/bin/bash +#!@runtimeShell@ # shellcheck shell=bash set -euo pipefail shopt -s nullglob -export SSL_CERT_FILE=/nix/store/6jsh5hyyli9ddac6dqxx07a68jzllkqb-nss-cacert-3.115/etc/ssl/certs/ca-bundle.crt -export PATH="/nix/store/rqn7v98b071xg19iyrz3qzlby8nwmqh3-nix-2.31.2/bin:/nix/store/xs8scz9w9jp4hpqycx3n3bah5y07ymgj-coreutils-9.8/bin:/nix/store/frzsv47z1mcyrp941zab08mx6kardizi-jq-1.8.1-bin/bin:/nix/store/69j5n7qzjlphqpgsx4bbbp6zcklm7cih-xmlstarlet-1.6.1/bin:/nix/store/xvh4bi0cc2cw18lpn6ax9m4zwnn1s9lj-curl-8.16.0-bin/bin:/nix/store/22r4s6lqhl43jkazn51f3c18qwk894g4-gnugrep-3.12/bin:/nix/store/8c4l9cqqj7pixqlmljx5d495pfpw8pys-gawk-5.3.2/bin:$PATH" +export SSL_CERT_FILE=@cacert@/etc/ssl/certs/ca-bundle.crt +export PATH="@binPath@:$PATH" # used for glob ordering of package names export LC_ALL=C