3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #146325 from ryantm/dev/ryantm/discourse-update-py

discourse/update.py: fix for nix 2.4/2.5pre
This commit is contained in:
Kim Lindberger 2021-11-23 15:37:32 +01:00 committed by GitHub
commit 7dfea71857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -79,7 +79,7 @@ def _call_nix_update(pkg, version):
def _nix_eval(expr: str):
nixpkgs_path = Path(__file__).parent / '../../../../'
try:
output = subprocess.check_output(['nix', 'eval', '--json', f'(with import {nixpkgs_path} {{}}; {expr})'], text=True)
output = subprocess.check_output(['nix-instantiate', '--strict', '--json', '--eval', '-E', f'(with import {nixpkgs_path} {{}}; {expr})'], text=True)
except subprocess.CalledProcessError:
return None
return json.loads(output)

View file

@ -6,13 +6,13 @@
# No gems used, so mkDerivation is fine.
stdenv.mkDerivation rec {
pname = "nix-universal-prefetch";
version = "0.3.0";
version = "0.4.0";
src = fetchFromGitHub {
owner = "samueldr";
repo = "nix-universal-prefetch";
rev = "v${version}";
sha256 = "1nmxp6846ip2x3mibys3ymgi0813g18p9szqnsciiib3dbis4kwf";
sha256 = "sha256-HGn4qHWqpUwlS3yQrD3j5oH0yOlphsoSPD2vkyyRv+0=";
};
installPhase = ''