mosdepth: build with a lockfile

This commit is contained in:
Emery Hemingway 2023-10-31 00:50:42 +00:00
parent cab3fd4d50
commit 0f089515b1
4 changed files with 85 additions and 9 deletions

View file

@ -0,0 +1,64 @@
{
"depends": [
{
"method": "fetchzip",
"packages": [
"d4"
],
"path": "/nix/store/gc6hspl4p050mrlm3v3gj6pw87rp3awj-source",
"ref": "v0.0.3",
"rev": "3536104b4070ff617537ef37db7cfbae36909546",
"sha256": "12n5snrxha27hz95qq7krgrmip39xvhb400y5b0awnh44gczwn90",
"srcDir": "src",
"url": "https://github.com/brentp/d4-nim/archive/3536104b4070ff617537ef37db7cfbae36909546.tar.gz"
},
{
"method": "fetchzip",
"packages": [
"docopt"
],
"path": "/nix/store/qdmip0p56pd5ivalp3waaqjkc1xvzaxn-source",
"ref": "v0.7.1",
"rev": "efaa112b6df172a9168c4eb581ab8dda1fbcfe2a",
"sha256": "0v85frvfm5difggs016g8llspsq8kd27lq00sv79v65ih9vlr9r4",
"srcDir": "src",
"url": "https://github.com/docopt/docopt.nim/archive/efaa112b6df172a9168c4eb581ab8dda1fbcfe2a.tar.gz"
},
{
"method": "fetchzip",
"packages": [
"hts"
],
"path": "/nix/store/k19hyryn922gy9f9xmdrj6i80p1npgk0-source",
"ref": "v0.3.25",
"rev": "e70f16a008d1c6526fa8c108c73968175505d9d0",
"sha256": "1pcvqp9lnsl575f13hf6rxg2pb0lsq6z1wi4pzva5yjv5cmwq3pk",
"srcDir": "src",
"url": "https://github.com/brentp/hts-nim/archive/e70f16a008d1c6526fa8c108c73968175505d9d0.tar.gz"
},
{
"method": "fetchzip",
"packages": [
"regex"
],
"path": "/nix/store/vfs4ysdw2kvyp18jwpbvb9wfh1ajz0a9-source",
"ref": "v0.23.0",
"rev": "577c4ec3b235c5fd2653a9c86cbc4a576cfc0869",
"sha256": "0401f9m2m2h6bikl3hffyhaw5fc2nbjdf5mj4z9wckmm9lx9hpkl",
"srcDir": "src",
"url": "https://github.com/nitely/nim-regex/archive/577c4ec3b235c5fd2653a9c86cbc4a576cfc0869.tar.gz"
},
{
"method": "fetchzip",
"packages": [
"unicodedb"
],
"path": "/nix/store/wpilzdf8vdwp7w129yrl821p9qvl3ky3-source",
"ref": "0.12.0",
"rev": "b055310c08db8f879057b4fec15c8301ee93bb2a",
"sha256": "0w77h75vrgp6jiq4dd9i2m4za2cf8qhjkz2wlxiz27yn2isjrndy",
"srcDir": "src",
"url": "https://github.com/nitely/nim-unicodedb/archive/b055310c08db8f879057b4fec15c8301ee93bb2a.tar.gz"
}
]
}

View file

@ -1,19 +1,27 @@
{ lib, nimPackages, fetchFromGitHub, docopt, hts, pcre }:
{ lib, buildNimPackage, fetchFromGitHub, pcre, testers }:
nimPackages.buildNimPackage rec {
buildNimPackage (finalAttrs: {
pname = "mosdepth";
version = "0.3.5";
nimBinOnly = true;
requiredNimVersion = 1;
src = fetchFromGitHub {
owner = "brentp";
repo = "mosdepth";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "sha256-tG3J51PS6A0WBCZ+j/Nf7aaukFV+DZJsxpbTbvwu0zc=";
};
buildInputs = [ docopt hts pcre ];
nimFlags = hts.nimFlags ++ [ "--threads:off" ];
lockFile = ./lock.json;
buildInputs = [ pcre ];
passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing";
@ -22,4 +30,4 @@ nimPackages.buildNimPackage rec {
maintainers = with maintainers; [ jbedo ];
platforms = platforms.linux;
};
}
})

View file

@ -39078,8 +39078,6 @@ with pkgs;
inherit (llvmPackages) openmp;
};
mosdepth = nim2Packages.callPackage ../applications/science/biology/mosdepth { };
niftyreg = callPackage ../applications/science/biology/niftyreg { };
niftyseg = callPackage ../applications/science/biology/niftyseg { };

View file

@ -1,5 +1,6 @@
{ lib
, stdenv
, htslib
, libsass
, openssl
, SDL2
@ -15,6 +16,11 @@
buildInputs = buildInputs ++ [ openssl ];
};
hts = lockAttrs: finalAttrs:
{ buildInputs ? [ ], ... }: {
buildInputs = buildInputs ++ [ htslib ];
};
sass = lockAttrs: finalAttrs:
{ buildInputs ? [ ], ... }: {
buildInputs = buildInputs ++ [ libsass ];