parent
2726f127c1
commit
79468d06a0
2 changed files with 97 additions and 0 deletions
52
pkgs/by-name/mi/min/lock.json
Normal file
52
pkgs/by-name/mi/min/lock.json
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"depends": [
|
||||
{
|
||||
"method": "fetchzip",
|
||||
"packages": [
|
||||
"checksums"
|
||||
],
|
||||
"path": "/nix/store/z6799507gzbw46lzbi1i8mwm0nbvrvnx-source",
|
||||
"ref": "v0.1.0",
|
||||
"rev": "7ff0b762332d2591bbeb65df9bb86d52ea44ec01",
|
||||
"sha256": "11612prr2wwbx414ip0zjh1fv638dgfvzxfd6v2f432n0wfwhjhj",
|
||||
"srcDir": "src",
|
||||
"url": "https://github.com/nim-lang/checksums/archive/7ff0b762332d2591bbeb65df9bb86d52ea44ec01.tar.gz"
|
||||
},
|
||||
{
|
||||
"method": "fetchzip",
|
||||
"packages": [
|
||||
"minline"
|
||||
],
|
||||
"path": "/nix/store/rirdlc80sn6pp5vmbw32xaaj56n1zxl8-source",
|
||||
"ref": "v0.1.1",
|
||||
"rev": "a1f11470316500dceb88d7d6c30979c35aab14ff",
|
||||
"sha256": "0wy8svpw0cldh1j6g5af4pxh6d6lac79sngg0i24dplh9pli7wb3",
|
||||
"srcDir": ".",
|
||||
"url": "https://github.com/h3rald/minline/archive/a1f11470316500dceb88d7d6c30979c35aab14ff.tar.gz"
|
||||
},
|
||||
{
|
||||
"method": "fetchzip",
|
||||
"packages": [
|
||||
"nimquery"
|
||||
],
|
||||
"path": "/nix/store/mys0888vyyd12h0qhzg709jk9jb6rmxa-source",
|
||||
"ref": "v2.0.1",
|
||||
"rev": "83e2866422788a1db1906734de056b410a49d047",
|
||||
"sha256": "0g1mcpfx42wnv2sg551gbgfralp7bf9fv83l2inbv2bhb063fx0z",
|
||||
"srcDir": "",
|
||||
"url": "https://github.com/GULPF/nimquery/archive/83e2866422788a1db1906734de056b410a49d047.tar.gz"
|
||||
},
|
||||
{
|
||||
"method": "fetchzip",
|
||||
"packages": [
|
||||
"zippy"
|
||||
],
|
||||
"path": "/nix/store/9iz31kiizzg76vpcc5jq53rf0wzjvbh8-source",
|
||||
"ref": "0.5.14",
|
||||
"rev": "21c8e279e257b0bc2a063b34e2304ea3aade21ec",
|
||||
"sha256": "05g7w61ql9kgrmnpm64y94lkiwj36i551c387gc71lz3dpllcn6q",
|
||||
"srcDir": "src",
|
||||
"url": "https://github.com/guzba/zippy/archive/21c8e279e257b0bc2a063b34e2304ea3aade21ec.tar.gz"
|
||||
}
|
||||
]
|
||||
}
|
45
pkgs/by-name/mi/min/package.nix
Normal file
45
pkgs/by-name/mi/min/package.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ lib, buildNimPackage, fetchFromGitHub, openssl, pcre }:
|
||||
|
||||
buildNimPackage (finalAttrs: {
|
||||
pname = "min";
|
||||
version = "0.43.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "h3rald";
|
||||
repo = "min";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-4coeasFZrbwYQ6FM0ENkh/pPcvN3rCuheUpmHr1f3wM=";
|
||||
};
|
||||
|
||||
lockFile = ./lock.json;
|
||||
|
||||
buildInputs = [ openssl pcre ];
|
||||
|
||||
prePatch = ''
|
||||
# substitude our code for their code for data
|
||||
substituteInPlace min.nimble \
|
||||
--replace-fail 'import' "" \
|
||||
--replace-warn 'minpkg/core/meta' "" \
|
||||
--replace-warn 'pkgVersion' '"${finalAttrs.version}"' \
|
||||
--replace-warn 'pkgAuthor' '""' \
|
||||
--replace-warn 'pkgDescription' '""' \
|
||||
--replace-warn 'pkgName' '"${finalAttrs.pname}"' \
|
||||
|
||||
# remove vendorabilities
|
||||
find . -name '*.a' -delete
|
||||
find minpkg/lib -name '*.nim' \
|
||||
-exec sed 's|{\.passL:.*\.}|discard|g' -i {} \;
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = [ "-lpcre" ];
|
||||
|
||||
meta = {
|
||||
description =
|
||||
"A functional, concatenative programming language with a minimalist syntax";
|
||||
homepage = "https://min-lang.org/";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "min";
|
||||
maintainers = with lib.maintainers; [ ehmry ];
|
||||
};
|
||||
|
||||
})
|
Loading…
Reference in a new issue