emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pdf-tools 72ef774320: Fix: build on NixOS without nixpkgs


From: ELPA Syncer
Subject: [nongnu] elpa/pdf-tools 72ef774320: Fix: build on NixOS without nixpkgs in the Nix path
Date: Tue, 25 Jan 2022 12:58:53 -0500 (EST)

branch: elpa/pdf-tools
commit 72ef774320d9eacd4d79b5016e9e989ab176afba
Author: Yevhen Shymotiuk <yevhenshymotiuk@pm.me>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>

    Fix: build on NixOS without nixpkgs in the Nix path
    
    People who use [Nix Flakes](https://nixos.wiki/wiki/Flakes) do not
    usually have `nixpkgs` in their `NIX_PATH`, which leads to failed
    builds, because `nix-shell` relies on it. I suppose some users might
    not have `nixpkgs` in `NIX_PATH` for other reasons also. I propose to
    use [NixOS/nixpkgs](https://github.com/NixOS/nixpkgs) in such cases
    
    Merges, Closes: #72
---
 server/autobuild | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/autobuild b/server/autobuild
index b128e9dfd3..e49a8b498f 100755
--- a/server/autobuild
+++ b/server/autobuild
@@ -389,6 +389,10 @@ os_nixos() {
     if [ -n "$DRY_RUN" ]; then
         return 0
     fi
+    if ! nix-instantiate --eval -E "<nixpkgs>" &>/dev/null; then
+      echo "File 'nixpkgs' was not found in the Nix path. Using NixOS/nixpkgs"
+      
NIX_PATH="nixpkgs=https://github.com/nixos/nixpkgs/archive/master.tar.gz:$NIX_PATH";
+    fi
     command="AUTOBUILD_NIX_SHELL=true"
     command="$command;export AUTOBUILD_NIX_SHELL"
     command="$command;$(quote "$0" "$@")"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]