From 2581f33dadafb587d3f4d5844c7997bc00740abc Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 24 May 2021 00:15:38 -0700 Subject: [PATCH] nix: Update Nixpkgs --- nix/sources.json | 8 ++++---- nix/sources.nix | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index a1ff3f1..037f524 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -12,15 +12,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "nixos-unstable", + "branch": "nixpkgs-unstable", "description": "Nix Packages collection", "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "266dc8c3d052f549826ba246d06787a219533b8f", - "sha256": "09ydqx2lznixmw8z4cfz1j3k137mh8n3cdpygwqymknhfdjq7lg4", + "rev": "efee454783c5c14ae78687439077c1d3f0544d97", + "sha256": "1qk4g8rav2mkbd6y2zr1pi3pxs4rwlkpr8xk51m0p26khprxvjaf", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/266dc8c3d052f549826ba246d06787a219533b8f.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/efee454783c5c14ae78687439077c1d3f0544d97.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/nix/sources.nix b/nix/sources.nix index b796fff..1938409 100644 --- a/nix/sources.nix +++ b/nix/sources.nix @@ -98,7 +98,10 @@ let saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name; ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}"; in - if ersatz == "" then drv else ersatz; + if ersatz == "" then drv else + # this turns the string into an actual Nix path (for both absolute and + # relative paths) + if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}"; # Ports of functions for older nix versions