From b21b0ab66bd0532ae776b349519cffdf20aaf3fa Mon Sep 17 00:00:00 2001 From: chordtoll Date: Sun, 22 Feb 2026 21:41:18 -0800 Subject: [PATCH] libamplsolver: 20211109 -> 1.0.1 --- pkgs/by-name/li/libamplsolver/package.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/li/libamplsolver/package.nix b/pkgs/by-name/li/libamplsolver/package.nix index 129307101b48..e836cc9a5741 100644 --- a/pkgs/by-name/li/libamplsolver/package.nix +++ b/pkgs/by-name/li/libamplsolver/package.nix @@ -2,16 +2,19 @@ lib, stdenv, substitute, - fetchurl, + fetchFromGitHub, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "libamplsolver"; - version = "20211109"; + version = "1.0.1"; - src = fetchurl { - url = "https://ampl.com/netlib/ampl/solvers.tgz"; - sha256 = "sha256-LVmScuIvxmZzywPSBl9T9YcUBJP7UFAa3eWs9r4q3JM="; + src = fetchFromGitHub { + owner = "ampl"; + repo = "asl"; + rootDir = "src/solvers"; + tag = "v${finalAttrs.version}"; + hash = "sha256-D1hB5z6r4n6+u1oWclhIst1mXDvObmOsh1j0uocairQ="; }; patches = [ @@ -25,6 +28,10 @@ stdenv.mkDerivation { }) ]; + preConfigure = '' + chmod u+x configure configurehere + ''; + env = { # For non-trapping FP architectures like loongarch64 and riscv64 NIX_CFLAGS_COMPILE = lib.optionalString ( @@ -59,4 +66,4 @@ stdenv.mkDerivation { # generates header at compile time broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform; }; -} +})