4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_68
|
|
, coreutils, bash, makeWrapper, python3 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "couchdb";
|
|
version = "3.1.1";
|
|
|
|
|
|
# when updating this, please consider bumping the erlang/OTP version
|
|
# in all-packages.nix
|
|
src = fetchurl {
|
|
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
|
|
sha256 = "18wcqxrv2bz88xadkqpqznprrxmcmwr0g6k895xrm8rbp9mpdzlg";
|
|
};
|
|
|
|
buildInputs = [ erlang icu openssl spidermonkey_68 (python3.withPackages(ps: with ps; [ requests ]))];
|
|
postPatch = ''
|
|
substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-68' "${spidermonkey_68.dev}/include/mozjs-68"
|
|
patchShebangs bin/rebar
|
|
'';
|
|
|
|
dontAddPrefix= "True";
|
|
configureFlags = ["--spidermonkey-version=68"];
|
|
buildFlags = ["release"];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r rel/couchdb/* $out
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
|
|
homepage = "http://couchdb.apache.org";
|
|
license = licenses.asl20;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ lostnet ];
|
|
};
|
|
}
|