Created
February 21, 2018 03:18
-
-
Save techtangents/814a4c98d380f28e69c331cb968ff65c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ mkDerivation, aeson, aeson-pretty, base, blaze-html, bytestring | |
, data-default, either, free, lens, optparse-applicative | |
, QuickCheck, semigroups, stdenv, system-filepath, tasty | |
, tasty-hunit, tasty-quickcheck, text, text1, time, url | |
, xml-conduit, xml-conduit-decode | |
}: | |
mkDerivation { | |
pname = "brazil"; | |
version = "0.1.0.0"; | |
src = ./.; | |
isLibrary = true; | |
isExecutable = true; | |
libraryHaskellDepends = [ | |
aeson aeson-pretty base blaze-html bytestring data-default either | |
free lens optparse-applicative semigroups text text1 time url | |
xml-conduit xml-conduit-decode | |
]; | |
executableHaskellDepends = [ | |
aeson aeson-pretty base blaze-html bytestring data-default either | |
free lens optparse-applicative semigroups text text1 url | |
xml-conduit xml-conduit-decode | |
]; | |
testHaskellDepends = [ | |
base data-default lens QuickCheck semigroups system-filepath tasty | |
tasty-hunit tasty-quickcheck text text1 url xml-conduit | |
xml-conduit-decode | |
]; | |
license = stdenv.lib.licenses.unfree; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{}: | |
let | |
nixpkgs = import ./nixpin.nix { }; | |
sources = { | |
text1 = nixpkgs.fetchFromGitHub { | |
owner = "qfpl"; | |
repo = "tex1"; | |
rev = "1b383775f706f2a0d38b793a34c9eb5fea2e77d1"; | |
sha256 = "01h44a9hkb5ki8b4yds8q5qbjy6mypjhfkgvrhwhxjq541wfx6lw"; # this sha is wrong | |
fetchSubmodules = true; | |
}; | |
}; | |
modifiedHaskellPackages = nixpkgs.haskellPackages.override { | |
overrides = self: super: { | |
xml-conduit-decode = nixpkgs.haskell.lib.dontCheck super.xml-conduit-decode; | |
text1 = import sources.text1 { inherit nixpkgs; }; | |
}; | |
}; | |
_brazil = modifiedHaskellPackages.callPackage ./brazil.nix { }; | |
in { | |
brazil = _brazil; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import (fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs-channels/archive/8b1cf100cd8badad6e1b6d4650b904b88aa870db.tar.gz"; | |
# Wait till new nix version is released. | |
#sha256 = "16lypr390jcl18d174z6ih732phbpqp40pjq06gsisnm04b6bl1z"; | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs = import ./nixpin.nix {}; | |
brazil' = (import ./. {}).brazil; | |
brazil = nixpkgs.haskell.lib.addBuildDepends brazil' (with nixpkgs.haskellPackages; | |
[ cabal-install cabal2nix hindent hasktags hlint apply-refact ghcid ] | |
); | |
in brazil.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#!nix-shell -i bash -p bash nix curl jq | |
# | |
# Updates the nixpin.nix to the latest channel release | |
# From https://gist.github.com/zimbatm/de5350245874361762b6a4dfe5366530 | |
set -euo pipefail | |
cd "$(dirname "$0")" || exit 1 | |
branch=nixos-unstable | |
owner=NixOS | |
repo=nixpkgs-channels | |
rev=$(curl -sfL https://api.github.com/repos/$owner/$repo/git/refs/heads/$branch | jq -r .object.sha) | |
url=https://github.com/$owner/$repo/archive/$rev.tar.gz | |
release_sha256=$(nix-prefetch-url "$url") | |
cat <<NIXPKGS | tee nixpin.nix | |
import (fetchTarball { | |
url = "$url"; | |
# Wait till new nix version is released. | |
#sha256 = "$release_sha256"; | |
} | |
) | |
NIXPKGS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment