From 47f5decc4caa8e1a8fd8a2bf9c43e08ce9bb2dfc Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Thu, 19 Dec 2024 00:06:12 +0800 Subject: [PATCH 1/2] calculix: rename to calculix-ccx --- .../calculix.patch => calculix-ccx/calculix-ccx.patch} | 0 pkgs/by-name/ca/{calculix => calculix-ccx}/package.nix | 4 ++-- pkgs/top-level/aliases.nix | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename pkgs/by-name/ca/{calculix/calculix.patch => calculix-ccx/calculix-ccx.patch} (100%) rename pkgs/by-name/ca/{calculix => calculix-ccx}/package.nix (95%) diff --git a/pkgs/by-name/ca/calculix/calculix.patch b/pkgs/by-name/ca/calculix-ccx/calculix-ccx.patch similarity index 100% rename from pkgs/by-name/ca/calculix/calculix.patch rename to pkgs/by-name/ca/calculix-ccx/calculix-ccx.patch diff --git a/pkgs/by-name/ca/calculix/package.nix b/pkgs/by-name/ca/calculix-ccx/package.nix similarity index 95% rename from pkgs/by-name/ca/calculix/package.nix rename to pkgs/by-name/ca/calculix-ccx/package.nix index aae2145133919..49c58b86407ae 100644 --- a/pkgs/by-name/ca/calculix/package.nix +++ b/pkgs/by-name/ca/calculix-ccx/package.nix @@ -12,7 +12,7 @@ assert (blas.isILP64 == lapack.isILP64 && blas.isILP64 == arpack.isILP64 && !blas.isILP64); stdenv.mkDerivation rec { - pname = "calculix"; + pname = "calculix-ccx"; version = "2.19"; src = fetchurl { @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ]; patches = [ - ./calculix.patch + ./calculix-ccx.patch ]; postPatch = '' diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 74e47c2d0be7c..c8173d5f5c65f 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -186,6 +186,7 @@ mapAliases { ### C ### caffeWithCuda = throw "caffeWithCuda has been removed, as it was broken and required CUDA 10"; # Added 2024-11-20 + calculix = calculix-ccx; # Added 2024-12-18 calligra = kdePackages.calligra; # Added 2024-09-27 callPackage_i686 = pkgsi686Linux.callPackage; cask = emacs.pkgs.cask; # Added 2022-11-12 From f5987ef17042028368ded99935faef632ce73fe2 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Thu, 19 Dec 2024 00:36:08 +0800 Subject: [PATCH 2/2] calculix-ccx: 2.19 -> 2.22 --- .../by-name/ca/calculix-ccx/calculix-ccx.patch | 18 ++++++++---------- pkgs/by-name/ca/calculix-ccx/package.nix | 18 +++++++++++------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/ca/calculix-ccx/calculix-ccx.patch b/pkgs/by-name/ca/calculix-ccx/calculix-ccx.patch index 36048546948c5..add650e1798be 100644 --- a/pkgs/by-name/ca/calculix-ccx/calculix-ccx.patch +++ b/pkgs/by-name/ca/calculix-ccx/calculix-ccx.patch @@ -1,8 +1,6 @@ -diff --git a/ccx_2.19/src/Makefile b/ccx_2.19/src/Makefile -index c503513..8a69a0c 100755 ---- a/ccx_2.19/src/Makefile -+++ b/ccx_2.19/src/Makefile -@@ -18,15 +18,10 @@ OCCXF = $(SCCXF:.f=.o) +--- old/ccx_2.22/src/Makefile 2024-08-06 01:13:21.031704000 +0800 ++++ new/ccx_2.22/src/Makefile 2024-12-19 00:27:06.848862592 +0800 +@@ -18,15 +18,10 @@ OCCXC = $(SCCXC:.c=.o) OCCXMAIN = $(SCCXMAIN:.c=.o) @@ -14,10 +12,10 @@ index c503513..8a69a0c 100755 - ../../../ARPACK/libarpack_INTEL.a \ - -lpthread -lm -lc - --ccx_2.19: $(OCCXMAIN) ccx_2.19.a $(LIBS) -- ./date.pl; $(CC) $(CFLAGS) -c ccx_2.19.c; $(FC) -Wall -O2 -o $@ $(OCCXMAIN) ccx_2.19.a $(LIBS) -fopenmp -+ccx_2.19: $(OCCXMAIN) ccx_2.19.a -+ $(CC) $(CFLAGS) -c ccx_2.19.c; $(FC) -Wall -O2 -o $@ $(OCCXMAIN) ccx_2.19.a $(LIBS) -fopenmp +-ccx_2.22: $(OCCXMAIN) ccx_2.22.a $(LIBS) +- ./date.pl; $(CC) $(CFLAGS) -c ccx_2.22.c; $(FC) -Wall -O2 -o $@ $(OCCXMAIN) ccx_2.22.a $(LIBS) -fopenmp ++ccx_2.22: $(OCCXMAIN) ccx_2.22.a ++ $(CC) $(CFLAGS) -c ccx_2.22.c; $(FC) -Wall -O2 -o $@ $(OCCXMAIN) ccx_2.22.a $(LIBS) -fopenmp - ccx_2.19.a: $(OCCXF) $(OCCXC) + ccx_2.22.a: $(OCCXF) $(OCCXC) ar vr $@ $? diff --git a/pkgs/by-name/ca/calculix-ccx/package.nix b/pkgs/by-name/ca/calculix-ccx/package.nix index 49c58b86407ae..9afb29e17e423 100644 --- a/pkgs/by-name/ca/calculix-ccx/package.nix +++ b/pkgs/by-name/ca/calculix-ccx/package.nix @@ -13,11 +13,11 @@ assert (blas.isILP64 == lapack.isILP64 && blas.isILP64 == arpack.isILP64 && !bla stdenv.mkDerivation rec { pname = "calculix-ccx"; - version = "2.19"; + version = "2.22"; src = fetchurl { url = "http://www.dhondt.de/ccx_${version}.src.tar.bz2"; - sha256 = "01vdy9sns58hkm39z6d0r5y7gzqf5z493d18jin9krqib1l6jnn7"; + hash = "sha256-OpTcx3WjH1cCKXNLNB1rBjAevcdZhj35Aci5vxhUwLw="; }; nativeBuildInputs = [ gfortran ]; @@ -43,15 +43,19 @@ stdenv.mkDerivation rec { ''; installPhase = '' + runHook preInstall + install -Dm0755 ccx_${version} $out/bin/ccx + + runHook postInstall ''; - meta = with lib; { - homepage = "http://www.calculix.de/"; + meta = { + homepage = "http://www.calculix.de"; description = "Three-dimensional structural finite element program"; mainProgram = "ccx"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ gebner ]; - platforms = platforms.unix; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ gebner ]; + platforms = lib.platforms.unix; }; }