From 46698f1b9b3a323231e7058f866d088bd605531b Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 2 Feb 2018 13:00:55 +0100 Subject: pkgs/build-sandbox: Zero-pad minor Nix version In order to do integer comparisons on the Nix version, we need to zero-pad the minor version, so that we always have two digits. Since the change of Nix version 1.12 to 2.0 the minor version no longer has two digits, so we get 20 instead of 112 and when compared the former is smaller than the latter but it has to be the opposite. Signed-off-by: aszlig --- pkgs/build-support/build-sandbox/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/build-sandbox/src/Makefile b/pkgs/build-support/build-sandbox/src/Makefile index cd642b8e..199e025a 100644 --- a/pkgs/build-support/build-sandbox/src/Makefile +++ b/pkgs/build-support/build-sandbox/src/Makefile @@ -2,7 +2,8 @@ BINARIES = $(wildcard $(BINDIR)/*) WRAPPERS = $(subst $(BINDIR),$(out)/bin,$(BINARIES)) NIX_VERSION = `pkg-config --modversion nix-main | \ - sed -e 's/^\([0-9]\+\)\.\([0-9]\+\).*/\1\2/'` + sed -e 's/^\([0-9]\+\)\.\([0-9][0-9]\).*/\1\2/' \ + -e 's/^\([0-9]\+\)\.\([0-9]\).*/\10\2/'` OBJECTS = nix-query.o path-cache.o params.o setup.o -- cgit 1.4.1