diff options
Diffstat (limited to 'nixpkgs/pkgs/by-name/sc')
-rw-r--r-- | nixpkgs/pkgs/by-name/sc/scala-update/package.nix | 47 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/sc/scd2html/package.nix | 43 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/sc/scdoc/package.nix | 42 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/sc/scimark/package.nix | 40 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/sc/screentest/package.nix | 7 |
5 files changed, 178 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/by-name/sc/scala-update/package.nix b/nixpkgs/pkgs/by-name/sc/scala-update/package.nix new file mode 100644 index 000000000000..d15292c4d32e --- /dev/null +++ b/nixpkgs/pkgs/by-name/sc/scala-update/package.nix @@ -0,0 +1,47 @@ +{ lib, stdenv, coursier, buildGraalvmNativeImage }: + +let + baseName = "scala-update"; + version = "0.2.2"; + deps = stdenv.mkDerivation { + name = "${baseName}-deps-${version}"; + buildCommand = '' + export COURSIER_CACHE=$(pwd) + ${coursier}/bin/cs fetch io.github.kitlangton:scala-update_2.13:${version} > deps + mkdir -p $out/share/java + cp $(< deps) $out/share/java/ + ''; + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; + outputHash = "kNnFzzHn+rFq4taqRYjBYaDax0MHW+vIoSFVN3wxA8M="; + }; +in buildGraalvmNativeImage { + pname = baseName; + inherit version; + + buildInputs = [ deps ]; + + src = "${deps}/share/java/${baseName}_2.13-${version}.jar"; + + extraNativeImageBuildArgs = + [ "--no-fallback" "--enable-url-protocols=https" "update.Main" ]; + + buildPhase = '' + runHook preBuild + + native-image ''${nativeImageBuildArgs[@]} -cp $(JARS=("${deps}/share/java"/*.jar); IFS=:; echo "''${JARS[*]}") + + runHook postBuild + ''; + + installCheckPhase = '' + $out/bin/${baseName} --version | grep -q "${version}" + ''; + + meta = with lib; { + description = "Update your Scala dependencies interactively"; + homepage = "https://github.com/kitlangton/scala-update"; + license = licenses.asl20; + maintainers = [ maintainers.rtimush ]; + }; +} diff --git a/nixpkgs/pkgs/by-name/sc/scd2html/package.nix b/nixpkgs/pkgs/by-name/sc/scd2html/package.nix new file mode 100644 index 000000000000..17cd4f211685 --- /dev/null +++ b/nixpkgs/pkgs/by-name/sc/scd2html/package.nix @@ -0,0 +1,43 @@ +{ lib +, stdenv +, fetchFromSourcehut +, scdoc +}: + +stdenv.mkDerivation rec { + pname = "scd2html"; + version = "1.0.0"; + + src = fetchFromSourcehut { + owner = "~bitfehler"; + repo = pname; + rev = "v${version}"; + hash = "sha256-oZSHv5n/WOrvy77tC94Z8pYugLpHkcv7U1PrzR+8fHM="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + scdoc + ]; + + postPatch = '' + substituteInPlace Makefile \ + --replace "LDFLAGS+=-static" "LDFLAGS+=" + ''; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "scd2html generates HTML from scdoc source files"; + homepage = "https://git.sr.ht/~bitfehler/scd2html"; + license = licenses.mit; + maintainers = with maintainers; [ ianmjones ]; + platforms = platforms.linux; + mainProgram = "scd2html"; + }; +} diff --git a/nixpkgs/pkgs/by-name/sc/scdoc/package.nix b/nixpkgs/pkgs/by-name/sc/scdoc/package.nix new file mode 100644 index 000000000000..3d8d759a769a --- /dev/null +++ b/nixpkgs/pkgs/by-name/sc/scdoc/package.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromSourcehut +, buildPackages +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "scdoc"; + version = "1.11.2-unstable-2023-03-08"; + + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = "scdoc"; + rev = "afeda241f3f9b2c27e461f32d9c2a704ab82ef61"; + hash = "sha256-jIYygjUXP/6o5d9drlZjdr25KjEQx8oy4TaQwQEu8fM="; + }; + + outputs = [ "out" "man" "dev" ]; + + postPatch = '' + substituteInPlace Makefile \ + --replace "LDFLAGS+=-static" "LDFLAGS+=" + ''; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + "HOST_SCDOC=${lib.getExe buildPackages.scdoc}" + ]; + + doCheck = true; + + meta = { + description = "A simple man page generator written in C99 for POSIX systems"; + homepage = "https://git.sr.ht/~sircmpwn/scdoc"; + changelog = "https://git.sr.ht/~sircmpwn/scdoc/refs/${finalAttrs.src.rev}"; + license = lib.licenses.mit; + mainProgram = "scdoc"; + maintainers = with lib.maintainers; [ primeos AndersonTorres ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/nixpkgs/pkgs/by-name/sc/scimark/package.nix b/nixpkgs/pkgs/by-name/sc/scimark/package.nix new file mode 100644 index 000000000000..c9a88e6d2b59 --- /dev/null +++ b/nixpkgs/pkgs/by-name/sc/scimark/package.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchurl +, unzip +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "scimark"; + version = "4c"; + + src = fetchurl { + url = "https://math.nist.gov/scimark2/scimark${finalAttrs.version}.zip"; + hash = "sha256-kcg5vKYp0B7+bC/CmFMO/tMwxf9q6nvuFv0vRSy3MbE="; + }; + + nativeBuildInputs = [ + unzip + ]; + + dontConfigure = true; + + installPhase = '' + runHook preInstall + + install -Dm755 scimark4 -t $out/bin/ + + runHook postInstall + ''; + + meta = { + homepage = "https://math.nist.gov/scimark2/index.html"; + description = "Scientific and numerical computing benchmark (ANSI C version)"; + downloadPage = "https://math.nist.gov/scimark2/download_c.html"; + license = lib.licenses.publicDomain; + mainProgram = "scimark4"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.all; + }; +}) +# TODO [ AndersonTorres ]: Java version diff --git a/nixpkgs/pkgs/by-name/sc/screentest/package.nix b/nixpkgs/pkgs/by-name/sc/screentest/package.nix index 0c76eaa2d8a8..d64f3300256f 100644 --- a/nixpkgs/pkgs/by-name/sc/screentest/package.nix +++ b/nixpkgs/pkgs/by-name/sc/screentest/package.nix @@ -18,13 +18,18 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-TJ47c77vQ/aRBJ2uEiFLuAR4dd4CMEo+iAAx0HCFbmA="; }; + strictDeps = true; + nativeBuildInputs = [ autoreconfHook intltool pkg-config + gtk2 # for autoconf macros ]; - buildInputs = [ gtk2 ]; + buildInputs = [ + gtk2 + ]; meta = with lib; { description = "A simple screen testing tool"; |