From 77dc1504a277b3bcd28e5870bfe9583e1839fc48 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 2 May 2024 18:44:09 +0900 Subject: [PATCH 1/4] migrate: format with nixfmt --- .../science/biology/migrate/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/biology/migrate/default.nix b/pkgs/applications/science/biology/migrate/default.nix index 31e4eb2fcb42..88e659a96d3d 100644 --- a/pkgs/applications/science/biology/migrate/default.nix +++ b/pkgs/applications/science/biology/migrate/default.nix @@ -1,4 +1,11 @@ -{ stdenv, lib, gccStdenv, fetchurl, zlib, mpi }: +{ + stdenv, + lib, + gccStdenv, + fetchurl, + zlib, + mpi, +}: gccStdenv.mkDerivation rec { version = "3.7.2"; @@ -9,9 +16,15 @@ gccStdenv.mkDerivation rec { sha256 = "1p2364ffjc56i82snzvjpy6pkf6wvqwvlvlqxliscx2c303fxs8v"; }; - buildInputs = [ zlib mpi ]; + buildInputs = [ + zlib + mpi + ]; setSourceRoot = "sourceRoot=$(echo */src)"; - buildFlags = [ "thread" "mpis" ]; + buildFlags = [ + "thread" + "mpis" + ]; preInstall = "mkdir -p $out/man/man1"; meta = with lib; { From e789c579c10b838f4894fd3d8eaf226211570720 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 2 May 2024 19:07:53 +0900 Subject: [PATCH 2/4] migrate: 3.7.2 -> 5.0.6 --- pkgs/applications/science/biology/migrate/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/biology/migrate/default.nix b/pkgs/applications/science/biology/migrate/default.nix index 88e659a96d3d..9d4865a4b9e1 100644 --- a/pkgs/applications/science/biology/migrate/default.nix +++ b/pkgs/applications/science/biology/migrate/default.nix @@ -8,12 +8,12 @@ }: gccStdenv.mkDerivation rec { - version = "3.7.2"; + version = "5.0.6"; pname = "migrate"; src = fetchurl { - url = "https://peterbeerli.com/migrate-html5/download_version3/${pname}-${version}.src.tar.gz"; - sha256 = "1p2364ffjc56i82snzvjpy6pkf6wvqwvlvlqxliscx2c303fxs8v"; + url = "https://peterbeerli.com/migrate-html5/download_version4/${pname}-${version}.src.tar.gz"; + hash = "sha256-twkoR9L6VPUye12OC0B5w0PxcxyKain6RkhCswLEdwg="; }; buildInputs = [ From f5d23a16edf9ae205ef73139c6145e44d144fe13 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 2 May 2024 19:08:25 +0900 Subject: [PATCH 3/4] migrate: add meta.mainProgram --- pkgs/applications/science/biology/migrate/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/science/biology/migrate/default.nix b/pkgs/applications/science/biology/migrate/default.nix index 9d4865a4b9e1..e9284f62b1ac 100644 --- a/pkgs/applications/science/biology/migrate/default.nix +++ b/pkgs/applications/science/biology/migrate/default.nix @@ -34,5 +34,6 @@ gccStdenv.mkDerivation rec { license = licenses.mit; maintainers = [ maintainers.bzizou ]; platforms = platforms.unix; + mainProgram = "migrate-n"; }; } From 21c42b3d39cea12839452be335f699277cc9ee30 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 2 May 2024 19:36:15 +0900 Subject: [PATCH 4/4] migrate: refactor --- .../applications/science/biology/migrate/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/science/biology/migrate/default.nix b/pkgs/applications/science/biology/migrate/default.nix index e9284f62b1ac..7820f177bfb7 100644 --- a/pkgs/applications/science/biology/migrate/default.nix +++ b/pkgs/applications/science/biology/migrate/default.nix @@ -1,31 +1,31 @@ { stdenv, lib, - gccStdenv, fetchurl, zlib, mpi, }: -gccStdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "5.0.6"; pname = "migrate"; src = fetchurl { - url = "https://peterbeerli.com/migrate-html5/download_version4/${pname}-${version}.src.tar.gz"; + url = "https://peterbeerli.com/migrate-html5/download_version4/${finalAttrs.pname}-${finalAttrs.version}.src.tar.gz"; hash = "sha256-twkoR9L6VPUye12OC0B5w0PxcxyKain6RkhCswLEdwg="; }; + sourceRoot = "migrate-${finalAttrs.version}/src"; + buildInputs = [ zlib mpi ]; - setSourceRoot = "sourceRoot=$(echo */src)"; + buildFlags = [ "thread" "mpis" ]; - preInstall = "mkdir -p $out/man/man1"; meta = with lib; { broken = stdenv.isDarwin; @@ -36,4 +36,4 @@ gccStdenv.mkDerivation rec { platforms = platforms.unix; mainProgram = "migrate-n"; }; -} +})