From f90f8dc0004097f5f023ea47104b54dcd740e014 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 7 Jun 2016 22:51:35 +0200 Subject: empty: init at 1.0.0 --- krebs/5pkgs/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 53fc4de44..f2bbaf7f4 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -20,6 +20,8 @@ with config.krebs.lib; (filterAttrs (_: dir.has-default-nix) (subdirsOf ./.)) // { + empty = pkgs.runCommand "empty-1.0.0" {} "mkdir $out"; + haskellPackages = pkgs.haskellPackages.override { overrides = self: super: mapAttrs (name: path: self.callPackage path {}) -- cgit v1.2.3 From 78dfd1fee8af963eb80d5fc71dcb52c6199a27d9 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 7 Jun 2016 23:10:27 +0200 Subject: cgit: RIP --- krebs/5pkgs/cgit/default.nix | 64 -------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 krebs/5pkgs/cgit/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/cgit/default.nix b/krebs/5pkgs/cgit/default.nix deleted file mode 100644 index 3180a5bd3..000000000 --- a/krebs/5pkgs/cgit/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ stdenv, fetchurl, openssl, zlib, asciidoc, libxml2, libxslt -, docbook_xml_xslt, pkgconfig, luajit -, gzip, bzip2, xz -}: - -stdenv.mkDerivation rec { - name = "cgit-${version}"; - version = "0.12"; - - src = fetchurl { - url = "http://git.zx2c4.com/cgit/snapshot/${name}.tar.xz"; - sha256 = "1dx54hgfyabmg9nm5qp6d01f54nlbqbbdwhwl0llb9imjf237qif"; - }; - - # cgit is tightly coupled with git and needs a git source tree to build. - # IMPORTANT: Remember to check which git version cgit needs on every version - # bump (look in the Makefile). - # NOTE: as of 0.10.1, the git version is compatible from 1.9.0 to - # 1.9.2 (see the repository history) - gitSrc = fetchurl { - url = "mirror://kernel/software/scm/git/git-2.7.2.tar.xz"; - sha256 = "086ga30ksijfxad085ply83ddf955d2b8qxph5sw6c9hab77j15j"; - }; - - buildInputs = [ - openssl zlib asciidoc libxml2 libxslt docbook_xml_xslt pkgconfig luajit - ]; - - postPatch = '' - sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \ - -e 's|"bzip2"|"${bzip2}/bin/bzip2"|' \ - -e 's|"xz"|"${xz}/bin/xz"|' \ - -i ui-snapshot.c - ''; - - # Give cgit a git source tree and pass configuration parameters (as make - # variables). - preBuild = '' - mkdir -p git - tar --strip-components=1 -xf "$gitSrc" -C git - - makeFlagsArray+=(prefix="$out" CGIT_SCRIPT_PATH="$out/cgit/") - ''; - - # Install manpage. - postInstall = '' - # xmllint fails: - #make install-man - - # bypassing xmllint works: - a2x --no-xmllint -f manpage cgitrc.5.txt - mkdir -p "$out/share/man/man5" - cp cgitrc.5 "$out/share/man/man5" - ''; - - meta = { - homepage = http://git.zx2c4.com/cgit/about/; - repositories.git = git://git.zx2c4.com/cgit; - description = "Web frontend for git repositories"; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ bjornfor ]; - }; -} -- cgit v1.2.3 From fb8be5838adfe58fc5d13235ac82022cbdb8f6e4 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 12 Jun 2016 13:53:23 +0200 Subject: writeFiles: init --- krebs/5pkgs/builders.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/builders.nix b/krebs/5pkgs/builders.nix index f60bbc9d0..8ba0ab5a7 100644 --- a/krebs/5pkgs/builders.nix +++ b/krebs/5pkgs/builders.nix @@ -81,6 +81,26 @@ rec { mv "$textPath" $out ''; + writeFiles = name: specs0: + let + specs = mapAttrsToList (path: spec0: { + path = assert types.pathname.check path; path; + var = "file_${hashString "sha1" path}"; + text = spec0.text; + }) specs0; + + filevars = genAttrs' specs (spec: nameValuePair spec.var spec.text); + + env = filevars // { passAsFile = attrNames filevars; }; + in + pkgs.runCommand name env /* sh */ '' + set -efu + PATH=${makeBinPath [pkgs.coreutils]} + ${concatMapStrings (spec: /* sh */ '' + install -D ''$${spec.var}Path $out${spec.path} + '') specs} + ''; + writeHaskell = k: let -- cgit v1.2.3