From c926bfc76565deb56ed58c1f9a15296af88eae1b Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 15 Mar 2025 05:00:49 +0000 Subject: [PATCH] scripts/check-nur: dont hardcode the location of this repo --- scripts/check-nur | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/check-nur b/scripts/check-nur index c075dac12..1bad0fd84 100755 --- a/scripts/check-nur +++ b/scripts/check-nur @@ -1,8 +1,12 @@ -#!/bin/sh -NIX_FILES_TOP=/home/colin/nixos +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p git + +SELF_PATH=$PWD/$0 +REPO_ROOT=$(git -C "$(dirname SELF_PATH)" rev-parse --show-toplevel) + nixpkgs=$(nix-store --realize $(nix-instantiate -A nixpkgs-bootstrap.master.src)) -cd $NIX_FILES_TOP/integrations/nur +cd $REPO_ROOT/integrations/nur NIX_PATH= NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-env -f . -qa \* --meta --xml \ --allowed-uris https://static.rust-lang.org \