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