From 47f54fc6d1f081c9fe7ac3d0bee705b3a78609d5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Mar 2017 01:23:09 +0100 Subject: Switch to bar in repo --- bragi/bar/default.nix | 30 ++++++++++++++++++++++++++++++ bragi/bar/generated.nix | 34 ++++++++++++++++++++++++++++++++++ bragi/bar/generated.nix.gup | 5 +++++ 3 files changed, 69 insertions(+) create mode 100644 bragi/bar/default.nix create mode 100644 bragi/bar/generated.nix create mode 100644 bragi/bar/generated.nix.gup (limited to 'bragi/bar') diff --git a/bragi/bar/default.nix b/bragi/bar/default.nix new file mode 100644 index 00000000..fd5e7acf --- /dev/null +++ b/bragi/bar/default.nix @@ -0,0 +1,30 @@ +{ haskellPackages +, stdenv +, fetchFromGitHub +, jquery +}: + +let + pkg = haskellPackages.callPackage ./generated.nix {}; + webshim = stdenv.mkDerivation rec { + name = "webshim-${version}"; + version = "1.16.0"; + src = fetchFromGitHub { + owner = "aFarkas"; + repo = "webshim"; + rev = "1.16.0"; + sha256 = "14pk7hljqipzp0n7vpgcfxr3w4bla57cwyd7bmwmmxrm2zn62cyh"; + }; + + installPhase = '' + mkdir -p $out/js + cp -r $src/js-webshim/dev/* $out/js/ + ''; + }; +in stdenv.lib.overrideDerivation pkg (drv: { + postUnpack = '' + rm -rf bar/static/jquery.js bar/static/webshim + ln -vs ${jquery}/js/jquery.js bar/static + ln -vs ${webshim}/js bar/static/webshim + ''; +}) diff --git a/bragi/bar/generated.nix b/bragi/bar/generated.nix new file mode 100644 index 00000000..4243ad4d --- /dev/null +++ b/bragi/bar/generated.nix @@ -0,0 +1,34 @@ +{ mkDerivation, aeson, base, bytestring, case-insensitive +, classy-prelude, classy-prelude-conduit, classy-prelude-yesod +, conduit, containers, data-default, directory, fast-logger +, fetchgit, file-embed, hjsmin, http-conduit, lens, monad-control +, monad-logger, mtl, persistent, persistent-postgresql +, persistent-template, safe, shakespeare, stdenv, template-haskell +, text, time, unordered-containers, vector, wai, wai-extra +, wai-logger, warp, yaml, yesod, yesod-auth, yesod-core, yesod-form +, yesod-static +}: +mkDerivation { + pname = "bar"; + version = "0.0.0"; + src = fetchgit { + url = "git://git.yggdrasil.li/gkleen/pub/bar"; + sha256 = "13h5hxwx4y79jr19l894zq4ynvkmhfds52xm8dlsdl5j69gg7laa"; + rev = "53fcf55c02f9335518c28d26429913258fc28f87"; + }; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson base bytestring case-insensitive classy-prelude + classy-prelude-conduit classy-prelude-yesod conduit containers + data-default directory fast-logger file-embed hjsmin http-conduit + lens monad-control monad-logger mtl persistent + persistent-postgresql persistent-template safe shakespeare + template-haskell text time unordered-containers vector wai + wai-extra wai-logger warp yaml yesod yesod-auth yesod-core + yesod-form yesod-static + ]; + executableHaskellDepends = [ base ]; + doHaddock = false; + license = stdenv.lib.licenses.unfree; +} diff --git a/bragi/bar/generated.nix.gup b/bragi/bar/generated.nix.gup new file mode 100644 index 00000000..eeb13ad2 --- /dev/null +++ b/bragi/bar/generated.nix.gup @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh + +gup -u ${2:r}.cabal +cd ${2:h} +cabal2nix --no-haddock "git://git.yggdrasil.li/gkleen/pub/bar" >! ${1} -- cgit v1.2.3 From 501b58422a67d462d524bc59f06ba64bb920350d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Mar 2017 01:44:47 +0100 Subject: Poke bar --- bragi/bar/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bragi/bar') diff --git a/bragi/bar/default.nix b/bragi/bar/default.nix index fd5e7acf..8b4fc6af 100644 --- a/bragi/bar/default.nix +++ b/bragi/bar/default.nix @@ -23,8 +23,8 @@ let }; in stdenv.lib.overrideDerivation pkg (drv: { postUnpack = '' - rm -rf bar/static/jquery.js bar/static/webshim - ln -vs ${jquery}/js/jquery.js bar/static - ln -vs ${webshim}/js bar/static/webshim + rm -rf static/jquery.js static/webshim + ln -vs ${jquery}/js/jquery.js static + ln -vs ${webshim}/js static/webshim ''; }) -- cgit v1.2.3 From 2ec093a696e583abaaf360d9439c817c4fcf6656 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Mar 2017 01:46:30 +0100 Subject: Poke --- bragi/bar/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'bragi/bar') diff --git a/bragi/bar/default.nix b/bragi/bar/default.nix index 8b4fc6af..d512f3d0 100644 --- a/bragi/bar/default.nix +++ b/bragi/bar/default.nix @@ -24,6 +24,7 @@ let in stdenv.lib.overrideDerivation pkg (drv: { postUnpack = '' rm -rf static/jquery.js static/webshim + ls -R ln -vs ${jquery}/js/jquery.js static ln -vs ${webshim}/js static/webshim ''; -- cgit v1.2.3 From 20710a50c845adaccbe21152df34860c0fc33dd8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Mar 2017 01:48:24 +0100 Subject: Undo pokings --- bragi/bar/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bragi/bar') diff --git a/bragi/bar/default.nix b/bragi/bar/default.nix index d512f3d0..480e3ea3 100644 --- a/bragi/bar/default.nix +++ b/bragi/bar/default.nix @@ -24,8 +24,7 @@ let in stdenv.lib.overrideDerivation pkg (drv: { postUnpack = '' rm -rf static/jquery.js static/webshim - ls -R - ln -vs ${jquery}/js/jquery.js static - ln -vs ${webshim}/js static/webshim + ln -vs ${jquery}/js/jquery.js bar-*/static + ln -vs ${webshim}/js bar-*/static/webshim ''; }) -- cgit v1.2.3 From ddf14c42cb08b2086565ffe87089d6338451f560 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Mar 2017 01:50:56 +0100 Subject: Repoke --- bragi/bar/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bragi/bar') diff --git a/bragi/bar/default.nix b/bragi/bar/default.nix index 480e3ea3..bbfa170c 100644 --- a/bragi/bar/default.nix +++ b/bragi/bar/default.nix @@ -23,8 +23,11 @@ let }; in stdenv.lib.overrideDerivation pkg (drv: { postUnpack = '' - rm -rf static/jquery.js static/webshim - ln -vs ${jquery}/js/jquery.js bar-*/static - ln -vs ${webshim}/js bar-*/static/webshim + ( + cd bar-*/static + rm -rf jquery.js webshim + ln -vs ${jquery}/js/jquery.js . + ln -vs ${webshim}/js webshim + ) ''; }) -- cgit v1.2.3