uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
61
pkgs/development/tools/purescript/spago/default.nix
Normal file
61
pkgs/development/tools/purescript/spago/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ haskell
|
||||
, haskellPackages
|
||||
, lib
|
||||
|
||||
# The following are only needed for the passthru.tests:
|
||||
, cacert
|
||||
, git
|
||||
, nodejs
|
||||
, purescript
|
||||
, runCommand
|
||||
}:
|
||||
|
||||
let
|
||||
spago =
|
||||
haskell.lib.compose.justStaticExecutables
|
||||
(haskell.lib.compose.overrideCabal (oldAttrs: {
|
||||
maintainers = (oldAttrs.maintainers or []) ++ [
|
||||
lib.maintainers.cdepillabout
|
||||
];
|
||||
changelog =
|
||||
"https://github.com/purescript/spago/releases/tag/${oldAttrs.version}";
|
||||
}) haskellPackages.spago);
|
||||
in
|
||||
|
||||
spago.overrideAttrs (oldAttrs: {
|
||||
passthru = (oldAttrs.passthru or {}) // {
|
||||
updateScript = ./update.sh;
|
||||
|
||||
# These tests can be run with the following command. The tests access the
|
||||
# network, so they cannot be run in the nix sandbox. sudo is needed in
|
||||
# order to change the sandbox option.
|
||||
#
|
||||
# $ sudo nix-build -A spago.passthru.tests --option sandbox relaxed
|
||||
#
|
||||
tests =
|
||||
runCommand
|
||||
"spago-tests"
|
||||
{
|
||||
__noChroot = true;
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
git
|
||||
nodejs
|
||||
purescript
|
||||
spago
|
||||
];
|
||||
}
|
||||
''
|
||||
# spago expects HOME to be set because it creates a cache file under
|
||||
# home.
|
||||
HOME=$(pwd)
|
||||
|
||||
spago --verbose init
|
||||
spago --verbose build
|
||||
spago --verbose test
|
||||
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
46
pkgs/development/tools/purescript/spago/spago.nix
Normal file
46
pkgs/development/tools/purescript/spago/spago.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, aeson-pretty, ansi-terminal, async-pool
|
||||
, base, bower-json, bytestring, containers, cryptonite, dhall
|
||||
, directory, either, extra, fetchgit, file-embed, filepath, foldl
|
||||
, fsnotify, generic-lens, Glob, hspec, hspec-discover
|
||||
, hspec-megaparsec, http-client, http-conduit, http-types
|
||||
, lens-family-core, lib, megaparsec, mtl, network-uri, open-browser
|
||||
, optparse-applicative, prettyprinter, process, QuickCheck, retry
|
||||
, rio, rio-orphans, safe, semver-range, stm, stringsearch, tar
|
||||
, template-haskell, temporary, text, time, transformers, turtle
|
||||
, unliftio, unordered-containers, utf8-string, versions, with-utf8
|
||||
, zlib
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "spago";
|
||||
version = "0.20.9";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/purescript/spago.git";
|
||||
sha256 = "00vdqg7vaw3d9zwh47886lw9fhhlwjagzhaj3aqz4xm92pjavhih";
|
||||
rev = "d16d4914200783fbd820ba89dbdf67270454faf5";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-pretty ansi-terminal async-pool base bower-json
|
||||
bytestring containers cryptonite dhall directory either file-embed
|
||||
filepath foldl fsnotify generic-lens Glob http-client http-conduit
|
||||
http-types lens-family-core megaparsec mtl network-uri open-browser
|
||||
optparse-applicative prettyprinter process retry rio rio-orphans
|
||||
safe semver-range stm stringsearch tar template-haskell temporary
|
||||
text time transformers turtle unliftio unordered-containers
|
||||
utf8-string versions with-utf8 zlib
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
ansi-terminal base text turtle with-utf8
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base containers directory extra hspec hspec-megaparsec megaparsec
|
||||
process QuickCheck temporary text turtle versions
|
||||
];
|
||||
testToolDepends = [ hspec-discover ];
|
||||
homepage = "https://github.com/purescript/spago#readme";
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
||||
39
pkgs/development/tools/purescript/spago/update.sh
Executable file
39
pkgs/development/tools/purescript/spago/update.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p cabal2nix curl jq haskellPackages.cabal2nix-unstable -I nixpkgs=.
|
||||
#
|
||||
# This script will update the spago derivation to the latest version using
|
||||
# cabal2nix.
|
||||
#
|
||||
# Note that you should always try building spago after updating it here, since
|
||||
# some of the overrides in pkgs/development/haskell/configuration-nix.nix may
|
||||
# need to be updated/changed.
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
# This is the directory of this update.sh script.
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
# Spago derivation created with cabal2nix.
|
||||
spago_derivation_file="${script_dir}/spago.nix"
|
||||
|
||||
# This is the current revision of spago in Nixpkgs.
|
||||
old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$spago_derivation_file")"
|
||||
|
||||
# This is the latest release version of spago on GitHub.
|
||||
new_version=$(curl --silent "https://api.github.com/repos/purescript/spago/releases" | jq '.[0].tag_name' --raw-output)
|
||||
|
||||
echo "Updating spago from old version $old_version to new version $new_version."
|
||||
echo "Running cabal2nix and outputting to ${spago_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$spago_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$spago_derivation_file"
|
||||
|
||||
cabal2nix --revision "$new_version" "https://github.com/purescript/spago.git" >> "$spago_derivation_file"
|
||||
|
||||
# TODO: This should ideally also automatically update the docsSearchVersion
|
||||
# from pkgs/development/haskell/configuration-nix.nix.
|
||||
|
||||
echo
|
||||
echo "Finished. Make sure you run the following commands to confirm Spago builds correctly:"
|
||||
echo ' - `nix build -L -f ./. spago`'
|
||||
echo ' - `sudo nix build -L -f ./. spago.passthru.tests --option sandbox relaxed`'
|
||||
Loading…
Add table
Add a link
Reference in a new issue