gren: init at 0.4.5
This commit is contained in:
parent
223f611353
commit
9bd83ec263
101
pkgs/by-name/gr/gren/generated-package.nix
Normal file
101
pkgs/by-name/gr/gren/generated-package.nix
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
# This file has been autogenerated with cabal2nix.
|
||||||
|
# Update via ./update.sh
|
||||||
|
{
|
||||||
|
mkDerivation,
|
||||||
|
ansi-terminal,
|
||||||
|
ansi-wl-pprint,
|
||||||
|
base,
|
||||||
|
base64-bytestring,
|
||||||
|
binary,
|
||||||
|
bytestring,
|
||||||
|
containers,
|
||||||
|
directory,
|
||||||
|
edit-distance,
|
||||||
|
fetchgit,
|
||||||
|
filelock,
|
||||||
|
filepath,
|
||||||
|
ghc-prim,
|
||||||
|
haskeline,
|
||||||
|
hspec,
|
||||||
|
hspec-discover,
|
||||||
|
indexed-traversable,
|
||||||
|
lib,
|
||||||
|
mtl,
|
||||||
|
prettyprint-avh4,
|
||||||
|
process,
|
||||||
|
raw-strings-qq,
|
||||||
|
scientific,
|
||||||
|
text,
|
||||||
|
time,
|
||||||
|
utf8-string,
|
||||||
|
vector,
|
||||||
|
}:
|
||||||
|
mkDerivation {
|
||||||
|
pname = "gren";
|
||||||
|
version = "0.4.5";
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/gren-lang/compiler.git";
|
||||||
|
sha256 = "0hbxzn14m9y7sqwk347yj7hblwmj5fyzmy7kjqc8zjd63gmrkdh8";
|
||||||
|
rev = "0efe25e3f48663a36eec525d2df0d957f53c9b4e";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
isLibrary = false;
|
||||||
|
isExecutable = true;
|
||||||
|
executableHaskellDepends = [
|
||||||
|
ansi-terminal
|
||||||
|
ansi-wl-pprint
|
||||||
|
base
|
||||||
|
base64-bytestring
|
||||||
|
binary
|
||||||
|
bytestring
|
||||||
|
containers
|
||||||
|
directory
|
||||||
|
edit-distance
|
||||||
|
filelock
|
||||||
|
filepath
|
||||||
|
ghc-prim
|
||||||
|
haskeline
|
||||||
|
indexed-traversable
|
||||||
|
mtl
|
||||||
|
prettyprint-avh4
|
||||||
|
process
|
||||||
|
raw-strings-qq
|
||||||
|
scientific
|
||||||
|
text
|
||||||
|
time
|
||||||
|
utf8-string
|
||||||
|
vector
|
||||||
|
];
|
||||||
|
testHaskellDepends = [
|
||||||
|
ansi-terminal
|
||||||
|
ansi-wl-pprint
|
||||||
|
base
|
||||||
|
base64-bytestring
|
||||||
|
binary
|
||||||
|
bytestring
|
||||||
|
containers
|
||||||
|
directory
|
||||||
|
edit-distance
|
||||||
|
filelock
|
||||||
|
filepath
|
||||||
|
ghc-prim
|
||||||
|
haskeline
|
||||||
|
hspec
|
||||||
|
indexed-traversable
|
||||||
|
mtl
|
||||||
|
prettyprint-avh4
|
||||||
|
process
|
||||||
|
raw-strings-qq
|
||||||
|
scientific
|
||||||
|
text
|
||||||
|
time
|
||||||
|
utf8-string
|
||||||
|
vector
|
||||||
|
];
|
||||||
|
testToolDepends = [ hspec-discover ];
|
||||||
|
jailbreak = true;
|
||||||
|
homepage = "https://gren-lang.org";
|
||||||
|
description = "The `gren` command line interface";
|
||||||
|
license = lib.licenses.bsd3;
|
||||||
|
mainProgram = "gren";
|
||||||
|
}
|
21
pkgs/by-name/gr/gren/package.nix
Normal file
21
pkgs/by-name/gr/gren/package.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
haskell,
|
||||||
|
haskellPackages,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (haskell.lib.compose) overrideCabal;
|
||||||
|
|
||||||
|
raw-pkg = (haskellPackages.callPackage ./generated-package.nix { }).overrideScope (
|
||||||
|
final: prev: {
|
||||||
|
ansi-wl-pprint = final.ansi-wl-pprint_0_6_9;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
overrides = {
|
||||||
|
maintainers = with lib.maintainers; [ tomasajt ];
|
||||||
|
passthru.updateScript = ./update.sh;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
overrideCabal overrides raw-pkg
|
22
pkgs/by-name/gr/gren/update.sh
Executable file
22
pkgs/by-name/gr/gren/update.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p cabal2nix curl jq nixfmt-rfc-style
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# This is the directory of this update.sh script.
|
||||||
|
script_dir="$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
derivation_file="${script_dir}/generated-package.nix"
|
||||||
|
latest_version="$(curl --silent 'https://api.github.com/repos/gren-lang/compiler/releases/latest' | jq --raw-output '.tag_name')"
|
||||||
|
|
||||||
|
echo "Updating gren to version ${latest_version}."
|
||||||
|
echo "Running cabal2nix and outputting to ${derivation_file}..."
|
||||||
|
|
||||||
|
cat > "${derivation_file}" << EOF
|
||||||
|
# This file has been autogenerated with cabal2nix.
|
||||||
|
# Update via ./update.sh
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cabal2nix 'https://github.com/gren-lang/compiler.git' --revision "${latest_version}" --jailbreak >> "${derivation_file}"
|
||||||
|
nixfmt "${derivation_file}"
|
||||||
|
|
||||||
|
echo 'Finished.'
|
Loading…
Reference in New Issue
Block a user