From c68e9ecaff866ffe01c415fb749a1d8b7cd3fff5 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 11 Sep 2023 19:24:37 -0300 Subject: [PATCH] scimark: migrate to by-name --- .../sc/scimark/package.nix} | 22 +++++++++++-------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 13 insertions(+), 11 deletions(-) rename pkgs/{misc/scimark/default.nix => by-name/sc/scimark/package.nix} (53%) diff --git a/pkgs/misc/scimark/default.nix b/pkgs/by-name/sc/scimark/package.nix similarity index 53% rename from pkgs/misc/scimark/default.nix rename to pkgs/by-name/sc/scimark/package.nix index 5726556e687f..c9a88e6d2b59 100644 --- a/pkgs/misc/scimark/default.nix +++ b/pkgs/by-name/sc/scimark/package.nix @@ -4,12 +4,12 @@ , unzip }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "scimark"; version = "4c"; src = fetchurl { - url = "https://math.nist.gov/scimark2/${pname}${version}.zip"; + url = "https://math.nist.gov/scimark2/scimark${finalAttrs.version}.zip"; hash = "sha256-kcg5vKYp0B7+bC/CmFMO/tMwxf9q6nvuFv0vRSy3MbE="; }; @@ -20,17 +20,21 @@ stdenv.mkDerivation rec { dontConfigure = true; installPhase = '' - install -d $out/bin/ - install scimark4 $out/bin/ + runHook preInstall + + install -Dm755 scimark4 -t $out/bin/ + + runHook postInstall ''; - meta = with lib; { + meta = { homepage = "https://math.nist.gov/scimark2/index.html"; description = "Scientific and numerical computing benchmark (ANSI C version)"; - license = licenses.publicDomain; - maintainers = with maintainers; [ AndersonTorres ]; + downloadPage = "https://math.nist.gov/scimark2/download_c.html"; + license = lib.licenses.publicDomain; mainProgram = "scimark4"; - platforms = platforms.all; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; }; -} +}) # TODO [ AndersonTorres ]: Java version diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8095e1b2ef84..ce649f2d1d9a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13012,8 +13012,6 @@ with pkgs; scream = callPackage ../applications/audio/scream { }; - scimark = callPackage ../misc/scimark { }; - screen = callPackage ../tools/misc/screen { inherit (darwin.apple_sdk.libs) utmp; };