diff options
author | Vladimír Čunát <v@cunat.cz> | 2019-10-09 16:56:13 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2019-10-10 12:38:07 +0200 |
commit | 3596c4c53ce62939542ba6c2c85d8ac70a6dde37 (patch) | |
tree | 65e0bacea0e498819581b2e2c6b0dce55d23a2f1 /pkgs/servers | |
parent | 38070d58f49f57c0085d43a619b4ffde516357a9 (diff) | |
parent | de513680c50faf05bf1ee585fb5c9128dcf4e67c (diff) |
Merge #70576: scylladb: fix build under sandboxing
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/scylladb/configure-etc-osrelease.patch | 28 | ||||
-rw-r--r-- | pkgs/servers/scylladb/default.nix | 7 |
2 files changed, 33 insertions, 2 deletions
diff --git a/pkgs/servers/scylladb/configure-etc-osrelease.patch b/pkgs/servers/scylladb/configure-etc-osrelease.patch new file mode 100644 index 0000000000000..5fd6c7caf0850 --- /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 dfbb8fd4b88eb..6f8f925602a6e 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 @@ -77,21 +77,24 @@ gcc8Stdenv.mkDerivation { postPatch = '' patchShebangs ./configure.py + patchShebangs seastar/json/json2code.py ''; configurePhase = '' ./configure.py --mode=release ''; + installPhase = '' mkdir $out cp -r * $out/ ''; + meta = with stdenv.lib; { description = "NoSQL data store using the seastar framework, compatible with Apache Cassandra"; homepage = "https://scylladb.com"; license = licenses.agpl3; platforms = stdenv.lib.platforms.linux; maintainers = [ stdenv.lib.maintainers.farlion ]; - broken = true; + requiredSystemFeatures = [ "big-parallel" ]; }; } |