diff options
author | Florian Peter <florian.peter@gmx.at> | 2019-10-07 10:48:22 +0800 |
---|---|---|
committer | Florian Peter <florian.peter@gmx.at> | 2019-10-07 13:21:31 +0800 |
commit | b932511029b78e94265166968f784939963d861a (patch) | |
tree | a0057addd3170a0f02806199c040613533cd5267 /pkgs/servers/scylladb | |
parent | 837cc0767dab585fed293445f9016592e5e07a54 (diff) | |
download | nixpkgs-b932511029b78e94265166968f784939963d861a.tar nixpkgs-b932511029b78e94265166968f784939963d861a.tar.gz nixpkgs-b932511029b78e94265166968f784939963d861a.tar.bz2 nixpkgs-b932511029b78e94265166968f784939963d861a.tar.lz nixpkgs-b932511029b78e94265166968f784939963d861a.tar.xz nixpkgs-b932511029b78e94265166968f784939963d861a.tar.zst nixpkgs-b932511029b78e94265166968f784939963d861a.zip |
scylladb: fix build access to /etc/os-release
Co-authored-by: Justin Humm <justin.humm@posteo.de>
Diffstat (limited to 'pkgs/servers/scylladb')
-rw-r--r-- | pkgs/servers/scylladb/configure-etc-osrelease.patch | 28 | ||||
-rw-r--r-- | pkgs/servers/scylladb/default.nix | 2 |
2 files changed, 29 insertions, 1 deletions
diff --git a/pkgs/servers/scylladb/configure-etc-osrelease.patch b/pkgs/servers/scylladb/configure-etc-osrelease.patch new file mode 100644 index 00000000000..5fd6c7caf08 --- /dev/null +++ b/pkgs/servers/scylladb/configure-etc-osrelease.patch @@ -0,0 +1,28 @@ +diff --git a/configure.py b/configure.py +index 25ca951ac..454140420 100755 +--- a/configure.py ++++ b/configure.py +@@ -36,13 +36,16 @@ tempfile.tempdir = "./build/tmp" + + configure_args = str.join(' ', [shlex.quote(x) for x in sys.argv[1:]]) + +-for line in open('/etc/os-release'): +- key, _, value = line.partition('=') +- value = value.strip().strip('"') +- if key == 'ID': +- os_ids = [value] +- if key == 'ID_LIKE': +- os_ids += value.split(' ') ++try: ++ for line in open('/etc/os-release'): ++ key, _, value = line.partition('=') ++ value = value.strip().strip('"') ++ if key == 'ID': ++ os_ids = [value] ++ if key == 'ID_LIKE': ++ os_ids += value.split(' ') ++except FileNotFoundError: ++ os_ids = ["linux"] + + + # distribution "internationalization", converting package names. diff --git a/pkgs/servers/scylladb/default.nix b/pkgs/servers/scylladb/default.nix index f48ace22f8f..b3e3e975915 100644 --- a/pkgs/servers/scylladb/default.nix +++ b/pkgs/servers/scylladb/default.nix @@ -41,7 +41,7 @@ gcc8Stdenv.mkDerivation { fetchSubmodules = true; }; - patches = [ ./seastar-configure-script-paths.patch ]; + patches = [ ./seastar-configure-script-paths.patch ./configure-etc-osrelease.patch ]; nativeBuildInputs = [ pkgconfig |