bruijn: init at 0-unstable-2025-06-23 (#418817)
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
{
|
||||
mkDerivation,
|
||||
array,
|
||||
base,
|
||||
binary,
|
||||
bitstring,
|
||||
bytestring,
|
||||
clock,
|
||||
containers,
|
||||
deepseq,
|
||||
directory,
|
||||
fetchzip,
|
||||
filepath,
|
||||
haskeline,
|
||||
lib,
|
||||
megaparsec,
|
||||
mtl,
|
||||
optparse-applicative,
|
||||
process,
|
||||
random,
|
||||
time,
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "bruijn";
|
||||
version = "0.1.0.0";
|
||||
src = fetchzip {
|
||||
url = "https://github.com/marvinborner/bruijn/archive/d60ad52f135370635db3a2db3363005670af14b8.tar.gz";
|
||||
sha256 = "182v56vc71467q8x7bp83ch6wp3kv5wgxrm53l2vvnvfqyqswpi2";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
enableSeparateDataOutput = true;
|
||||
libraryHaskellDepends = [
|
||||
array
|
||||
base
|
||||
binary
|
||||
bitstring
|
||||
bytestring
|
||||
clock
|
||||
containers
|
||||
deepseq
|
||||
directory
|
||||
filepath
|
||||
haskeline
|
||||
megaparsec
|
||||
mtl
|
||||
optparse-applicative
|
||||
process
|
||||
random
|
||||
time
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
array
|
||||
base
|
||||
binary
|
||||
bitstring
|
||||
bytestring
|
||||
clock
|
||||
containers
|
||||
deepseq
|
||||
directory
|
||||
filepath
|
||||
haskeline
|
||||
megaparsec
|
||||
mtl
|
||||
optparse-applicative
|
||||
process
|
||||
random
|
||||
time
|
||||
];
|
||||
homepage = "https://github.com/githubuser/bruijn#readme";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "bruijn";
|
||||
maintainers = [ lib.maintainers.defelo ];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
haskell,
|
||||
haskellPackages,
|
||||
lib,
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
||||
|
||||
generated = haskellPackages.callPackage ./generated.nix { };
|
||||
|
||||
overrides = {
|
||||
version = lib.fileContents ./version.txt;
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
description = "Purely functional programming language based on lambda calculus and de Bruijn indices";
|
||||
homepage = "https://bruijn.marvinborner.de/";
|
||||
};
|
||||
in
|
||||
|
||||
lib.pipe generated [
|
||||
(overrideCabal overrides)
|
||||
justStaticExecutables
|
||||
]
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p coreutils cabal2nix curl jq nixfmt-rfc-style
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
{ read -r rev; read -r committer_date; } \
|
||||
< <(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sfL https://api.github.com/repos/marvinborner/bruijn/branches/main \
|
||||
| jq -r '.commit | .sha, .commit.committer.date')
|
||||
|
||||
cabal2nix --maintainer defelo "https://github.com/marvinborner/bruijn/archive/${rev}.tar.gz" \
|
||||
| nixfmt \
|
||||
> generated.nix
|
||||
|
||||
echo "0-unstable-$(date -I --date="$committer_date")" > version.txt
|
||||
@@ -0,0 +1 @@
|
||||
0-unstable-2025-06-23
|
||||
Reference in New Issue
Block a user