diff options
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/haskell/blessings.nix | 17 | ||||
-rw-r--r-- | krebs/5pkgs/haskell/email-header.nix | 21 | ||||
-rw-r--r-- | krebs/5pkgs/override/default.nix | 12 | ||||
-rw-r--r-- | krebs/5pkgs/simple/bitlbee-discord/default.nix | 29 | ||||
-rw-r--r-- | krebs/5pkgs/simple/cholerab/default.nix | 17 | ||||
-rw-r--r-- | krebs/5pkgs/simple/go-shortener/default.nix | 8 | ||||
-rw-r--r-- | krebs/5pkgs/simple/newsbot-js/default.nix | 8 | ||||
-rw-r--r-- | krebs/5pkgs/simple/nix-prefetch-github.nix | 25 |
8 files changed, 67 insertions, 70 deletions
diff --git a/krebs/5pkgs/haskell/blessings.nix b/krebs/5pkgs/haskell/blessings.nix index 55f2d17d0..b0e81fdc1 100644 --- a/krebs/5pkgs/haskell/blessings.nix +++ b/krebs/5pkgs/haskell/blessings.nix @@ -6,19 +6,10 @@ with import <stockholm/lib>; version = "1.1.0"; sha256 = "1k908zap3694fcxdk4bb29s54b0lhdh557y10ybjskfwnym7szn1"; }; - "18.09" = { - version = "2.2.0"; - sha256 = "1pb56dgf3jj2kq3cbbppwzyg3ccgqy9xara62hkjwyxzdx20clk1"; - }; - "19.03" = { - version = "2.2.0"; - sha256 = "1pb56dgf3jj2kq3cbbppwzyg3ccgqy9xara62hkjwyxzdx20clk1"; - }; - "19.09" = { - version = "2.2.0"; - sha256 = "1pb56dgf3jj2kq3cbbppwzyg3ccgqy9xara62hkjwyxzdx20clk1"; - }; - }.${versions.majorMinor version}; + }.${versions.majorMinor version} or { + version = "2.2.0"; + sha256 = "1pb56dgf3jj2kq3cbbppwzyg3ccgqy9xara62hkjwyxzdx20clk1"; + }; in mkDerivation { pname = "blessings"; diff --git a/krebs/5pkgs/haskell/email-header.nix b/krebs/5pkgs/haskell/email-header.nix index 8b7165860..572a8029c 100644 --- a/krebs/5pkgs/haskell/email-header.nix +++ b/krebs/5pkgs/haskell/email-header.nix @@ -10,22 +10,11 @@ with import <stockholm/lib>; rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8"; sha256 = "12j2n3sbvzjnw99gga7kkdygm8n3qx2lh8q26ad6a53xm5whnz59"; }; - "18.09" = { - version = "0.4.1-tv1"; - rev = "refs/tags/v${cfg.version}"; - sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; - }; - "19.03" = { - version = "0.4.1-tv1"; - rev = "refs/tags/v${cfg.version}"; - sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; - }; - "19.09" = { - version = "0.4.1-tv1"; - rev = "refs/tags/v${cfg.version}"; - sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; - }; - }.${versions.majorMinor version}; + }.${versions.majorMinor version} or { + version = "0.4.1-tv1"; + rev = "refs/tags/v${cfg.version}"; + sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; + }; in mkDerivation { pname = "email-header"; diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix new file mode 100644 index 000000000..704831823 --- /dev/null +++ b/krebs/5pkgs/override/default.nix @@ -0,0 +1,12 @@ +with import <stockholm/lib>; +self: super: { + + exim = super.exim.overrideAttrs (old: rec { + name = warnOldVersion old.name "exim-4.92.2"; + src = self.fetchurl { + url = "https://ftp.exim.org/pub/exim/exim4/${name}.tar.xz"; + sha256 = "0m56jsh2fzvwj4rdpcc3pkd5vsi40cjrpzalis7l1zq33m4axmq1"; + }; + }); + +} diff --git a/krebs/5pkgs/simple/bitlbee-discord/default.nix b/krebs/5pkgs/simple/bitlbee-discord/default.nix deleted file mode 100644 index c01b87d6b..000000000 --- a/krebs/5pkgs/simple/bitlbee-discord/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ fetchurl, fetchFromGitHub, stdenv, bitlbee, autoreconfHook, pkgconfig, glib }: - -with stdenv.lib; -stdenv.mkDerivation rec { - name = "bitlbee-discord-2017-12-27"; - - src = fetchFromGitHub { - rev = "6a03db169ad44fee55609ecd16e19f3c0f99a182"; - owner = "sm00th"; - repo = "bitlbee-discord"; - sha256 = "1ci9a12c6zg8d6i9f95pq6dal79cp4klmmsyj8ag2gin90kl3x95"; - }; - - nativeBuildInputs = [ autoreconfHook pkgconfig ]; - buildInputs = [ bitlbee glib ]; - - preConfigure = '' - export BITLBEE_PLUGINDIR=$out/lib/bitlbee - ./autogen.sh - ''; - - meta = { - description = "Bitlbee plugin for Discord"; - - homepage = https://github.com/sm00th/bitlbee-discord; - license = licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/krebs/5pkgs/simple/cholerab/default.nix b/krebs/5pkgs/simple/cholerab/default.nix index 94514fe44..007776164 100644 --- a/krebs/5pkgs/simple/cholerab/default.nix +++ b/krebs/5pkgs/simple/cholerab/default.nix @@ -1,7 +1,16 @@ -{ fetchgit, callPackage }: let - src = fetchgit { - url = "https://github.com/krebs/cholerab"; +{ stdenv, fetchFromGitHub, pandoc }: +stdenv.mkDerivation { + name = "cholerab"; + src = fetchFromGitHub { + owner = "krebs"; + repo = "cholerab"; rev = "25d7ef051d6fc74d99b155e768b3c650296a230c"; sha256 = "1pymw7v2ql42iq825ccx98s4fp9jsz5b2hjr1qad6bamfc6i7yy9"; }; -in callPackage src {} + phases = [ "buildPhase" ]; + buildPhase = '' + mkdir -p $out/share/man/man1 + ${pandoc}/bin/pandoc -s -t man $src/thesauron.md -o $out/share/man/man1/thesauron.1 + ${pandoc}/bin/pandoc -s -t man $src/enterprise-patterns.md -o $out/share/man/man1/enterprise-patterns.1 + ''; +} diff --git a/krebs/5pkgs/simple/go-shortener/default.nix b/krebs/5pkgs/simple/go-shortener/default.nix index 4d1bef2be..5e734553b 100644 --- a/krebs/5pkgs/simple/go-shortener/default.nix +++ b/krebs/5pkgs/simple/go-shortener/default.nix @@ -1,11 +1,11 @@ -{ stdenv, makeWrapper, lib, buildEnv, fetchgit, nodejs-8_x, pkgs }: +{ stdenv, makeWrapper, lib, buildEnv, fetchgit, nodejs-12_x, pkgs }: with lib; let nodeEnv = import <nixpkgs/pkgs/development/node-packages/node-env.nix> { inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; - nodejs = nodejs-8_x; + nodejs = nodejs-12_x; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; @@ -34,7 +34,7 @@ in stdenv.mkDerivation { ]; buildInputs = [ - nodejs-8_x + nodejs-12_x makeWrapper ]; @@ -43,7 +43,7 @@ in stdenv.mkDerivation { cp index.js $out/ cat > $out/go << EOF - ${nodejs-8_x}/bin/node $out/index.js + ${nodejs-12_x}/bin/node $out/index.js EOF chmod +x $out/go diff --git a/krebs/5pkgs/simple/newsbot-js/default.nix b/krebs/5pkgs/simple/newsbot-js/default.nix index cc362b86a..055e6b476 100644 --- a/krebs/5pkgs/simple/newsbot-js/default.nix +++ b/krebs/5pkgs/simple/newsbot-js/default.nix @@ -1,11 +1,11 @@ -{ stdenv, makeWrapper, lib, buildEnv, fetchgit, nodejs-8_x, pkgs, icu }: +{ stdenv, makeWrapper, lib, buildEnv, fetchgit, nodejs-12_x, pkgs, icu }: with lib; let nodeEnv = import <nixpkgs/pkgs/development/node-packages/node-env.nix> { inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; - nodejs = nodejs-8_x; + nodejs = nodejs-12_x; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; @@ -36,7 +36,7 @@ in stdenv.mkDerivation { ]; buildInputs = [ - nodejs-8_x + nodejs-12_x makeWrapper ]; @@ -45,7 +45,7 @@ in stdenv.mkDerivation { cp newsbot.js $out/ cat > $out/newsbot << EOF - ${nodejs-8_x}/bin/node $out/newsbot.js + ${nodejs-12_x}/bin/node $out/newsbot.js EOF chmod +x $out/newsbot diff --git a/krebs/5pkgs/simple/nix-prefetch-github.nix b/krebs/5pkgs/simple/nix-prefetch-github.nix new file mode 100644 index 000000000..14096c33f --- /dev/null +++ b/krebs/5pkgs/simple/nix-prefetch-github.nix @@ -0,0 +1,25 @@ +{ curl, jq, nix, writeDashBin }: + +writeDashBin "nix-prefetch-github" '' + # usage: nix-prefetch-github OWNER REPO [REF] + set -efu + + owner=$1 + repo=$2 + ref=''${3-master} + + info_url=https://api.github.com/repos/$owner/$repo/commits/$ref + info=$(${curl}/bin/curl -fsS "$info_url") + rev=$(printf %s "$info" | ${jq}/bin/jq -r .sha) + + name=$owner-$repo-$ref + url=https://github.com/$owner/$repo/tarball/$rev + sha256=$(${nix}/bin/nix-prefetch-url --name "$name" --unpack "$url") + + export owner repo rev sha256 + ${jq}/bin/jq -n ' + env | { + owner, repo, rev, sha256 + } + ' +'' |