Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 968dca855654
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2cc4200de0b8
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 25, 2018

  1. cdb: init at 0.75

    We check in the docs from a mirror repository, because the upstream
    release doesn’t provide them.
    Profpatsch committed Oct 25, 2018
    Copy the full SHA
    2cc4200 View commit details
Showing with 59 additions and 0 deletions.
  1. +57 −0 pkgs/development/tools/database/cdb/default.nix
  2. +2 −0 pkgs/top-level/all-packages.nix
57 changes: 57 additions & 0 deletions pkgs/development/tools/database/cdb/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{ stdenv, lib, fetchurl, fetchFromGitHub, writeText }:

let
version = "0.75";
sha256 = "1iajg55n47hqxcpdzmyq4g4aprx7bzxcp885i850h355k5vmf68r";
# Please don’t forget to update the docs:
# clone https://github.com/Profpatsch/cdb-docs
# and create a pull request with the result of running
# ./update <version>
# from the repository’s root folder.
docRepo = fetchFromGitHub {
owner = "Profpatsch";
repo = "cdb-docs";
rev = "359b6c55c9e170ebfc88f3f38face8ae2315eacb";
sha256 = "1y0ivviy58i0pmavhvrpznc4yjigjknff298gnw9rkg5wxm0gbbq";
};

in stdenv.mkDerivation {
name = "cdb-${version}";

src = fetchurl {
url = "https://cr.yp.to/cdb/cdb-${version}.tar.gz";
inherit sha256;
};

outputs = [ "bin" "doc" "out" ];

postPatch = ''
# A little patch, borrowed from Archlinux AUR, borrowed from Gentoo Portage
sed -e 's/^extern int errno;$/#include <errno.h>/' -i error.h
'';

postInstall = ''
# don't use make setup, but move the binaries ourselves
mkdir -p $bin/bin
install -m 755 -t $bin/bin/ cdbdump cdbget cdbmake cdbmake-12 cdbmake-sv cdbstats cdbtest
# patch paths in scripts
function cdbmake-subst {
substituteInPlace $bin/bin/$1 \
--replace /usr/local/bin/cdbmake $bin/bin/cdbmake
}
cdbmake-subst cdbmake-12
cdbmake-subst cdbmake-sv
# docs
mkdir -p $doc/share/cdb
cp -r "${docRepo}/docs" $doc/share/cdb/html
'';

meta = {
homepage = "https://cr.yp.to/cdb";
license = lib.licenses.publicDomain;
maintainers = [ lib.maintainers.Profpatsch ];
platforms = [ lib.platforms.unix ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -6463,6 +6463,8 @@ with pkgs;
inherit (darwin) bootstrap_cmds;
};

cdb = callPackage ../development/tools/database/cdb { };

chez = callPackage ../development/compilers/chez {
inherit (darwin) cctools;
};