push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "hd-idle";
version = "1.21";
src = fetchFromGitHub {
owner = "adelolmo";
repo = "hd-idle";
rev = "v${version}";
sha256 = "sha256-WHJcysTN9LHI1WnDuFGTyTirxXirpLpJIeNDj4sZGY0=";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installManPage debian/hd-idle.8
'';
meta = with lib; {
description = "Spins down external disks after a period of idle time";
mainProgram = "hd-idle";
homepage = "https://github.com/adelolmo/hd-idle";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.rycee ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
libglut,
libGL,
libGLU,
}:
stdenv.mkDerivation rec {
pname = "hdaps-gl";
version = "0.0.7";
src = fetchFromGitHub {
owner = "linux-thinkpad";
repo = "hdaps-gl";
rev = version;
sha256 = "0jywsrcr1wzkjig5cvz014c3r026sbwscbkv7zh1014lkjm0kyyh";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
libglut
libGL
libGLU
];
meta = with lib; {
description = "GL-based laptop model that rotates in real-time via hdaps";
homepage = "https://github.com/linux-thinkpad/hdaps-gl";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = [ maintainers.symphorien ];
mainProgram = "hdaps-gl";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchurl,
udevCheckHook,
}:
stdenv.mkDerivation rec {
pname = "hdapsd";
version = "20141203";
src = fetchurl {
url = "https://github.com/evgeni/hdapsd/releases/download/${version}/hdapsd-${version}.tar.gz";
sha256 = "0ppgrfabd0ivx9hyny3c3rv4rphjyxcdsd5svx5pgfai49mxnl36";
};
nativeBuildInputs = [
udevCheckHook
];
doInstallCheck = true;
postInstall = builtins.readFile ./postInstall.sh;
meta = with lib; {
description = "Hard Drive Active Protection System Daemon";
mainProgram = "hdapsd";
homepage = "http://hdaps.sf.net/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,7 @@
mkdir -p $out/lib/udev/rules.d $out/lib/systemd/system
cp misc/hdapsd.rules $out/lib/udev/rules.d
SBIN_REWRITE="s|@sbindir@|$out/bin|g"
for i in misc/*.service.in
do sed $SBIN_REWRITE "$i" > "$out/lib/systemd/system/$(basename ${i%.in})"
done

View File

@@ -0,0 +1,20 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
version = "1.6.02";
pname = "hdate";
src = fetchurl {
url = "https://sourceforge.net/projects/libhdate/files/libhdate/libhdate-${version}/libhdate-${version}.tar.bz2";
sha256 = "3c930a8deb57c01896dc37f0d7804e5a330ee8e88c4ff610b71f9d2b02c17762";
};
meta = {
description = "Hebrew calendar and solar astronomical times library and utilities";
homepage = "https://sourceforge.net/projects/libhdate/";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ CharlesHD ];
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
rustPlatform,
fetchFromGitHub,
hddtemp,
hdparm,
sdparm,
smartmontools,
makeWrapper,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "hddfancontrol";
version = "2.0.5";
src = fetchFromGitHub {
owner = "desbma";
repo = "hddfancontrol";
tag = finalAttrs.version;
hash = "sha256-kKzjg2D/7Thzu6JzmLyu2eJAr+N6Bi95WEBKrqB/vXo=";
};
cargoHash = "sha256-0TRNiRmxwV/p7nLOrU9GHjTzIaan4JV8C6e443nd2zY=";
nativeBuildInputs = [
makeWrapper
installShellFiles
];
postBuild = ''
mkdir -p target/man
cargo run --features gen-man-pages -- target/man
'';
postInstall = ''
mkdir -p $out/etc/systemd/system
substitute systemd/hddfancontrol.service $out/etc/systemd/system/hddfancontrol.service \
--replace-fail /usr/bin/hddfancontrol $out/bin/hddfancontrol
sed -i -e '/EnvironmentFile=.*/d' $out/etc/systemd/system/hddfancontrol.service
cd target/man
installManPage hddfancontrol-daemon.1 hddfancontrol-pwm-test.1 hddfancontrol.1
'';
postFixup = ''
wrapProgram $out/bin/hddfancontrol \
--prefix PATH : ${
lib.makeBinPath [
hddtemp
hdparm
sdparm
smartmontools
]
}
'';
meta = {
description = "Dynamically control fan speed according to hard drive temperature on Linux";
changelog = "https://github.com/desbma/hddfancontrol/releases/tag/${finalAttrs.version}";
homepage = "https://github.com/desbma/hddfancontrol";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
benley
philipwilk
];
mainProgram = "hddfancontrol";
};
})

View File

@@ -0,0 +1,28 @@
diff -Nuar --exclude '*~' hddtemp-0.3-beta15.orig/src/sata.c hddtemp-0.3-beta15/src/sata.c
--- hddtemp-0.3-beta15.orig/src/sata.c 2006-05-14 02:09:55.579437498 -0700
+++ hddtemp-0.3-beta15/src/sata.c 2006-05-14 02:06:08.495948437 -0700
@@ -88,7 +88,9 @@
return strdup(_("unknown"));
else
{
+ //fprintf(stderr,"sata_model1=%s\n",identify + 54);
sata_fixstring(identify + 54, 24);
+ //fprintf(stderr,"sata_model2=%s\n",identify + 54);
return strdup(identify + 54);
}
}
diff -Nuar --exclude '*~' hddtemp-0.3-beta15.orig/src/satacmds.c hddtemp-0.3-beta15/src/satacmds.c
--- hddtemp-0.3-beta15.orig/src/satacmds.c 2006-05-14 02:09:40.983470339 -0700
+++ hddtemp-0.3-beta15/src/satacmds.c 2006-05-14 02:09:02.319557333 -0700
@@ -98,7 +98,10 @@
/* convert from big-endian to host byte order */
for (p = end ; p != s;) {
unsigned short *pp = (unsigned short *) (p -= 2);
- *pp = ntohs(*pp);
+ char tmp = p[0];
+ p[0] = p[1];
+ p[1] = tmp;
+ //*pp = ntohs(*pp);
}
/* strip leading blanks */

View File

@@ -0,0 +1,20 @@
--- hddtemp-0.3-beta15/src/sata.c 2012-07-01 16:35:01.681708074 +0200
+++ hddtemp-0.3-beta15/src/sata.c 2012-07-01 16:33:58.172109699 +0200
@@ -125,6 +125,17 @@
dsk->fd = -1;
return GETTEMP_NOSENSOR;
}
+
+ switch(ata_get_powermode(dsk->fd)) {
+ case PWM_STANDBY:
+ case PWM_SLEEPING:
+ if (!wakeup)
+ return GETTEMP_DRIVE_SLEEP;
+ case PWM_UNKNOWN:
+ case PWM_ACTIVE: /* active or idle */
+ default:
+ break;
+ }
/* get SMART values */
if(sata_enable_smart(dsk->fd) != 0) {

View File

@@ -0,0 +1,21 @@
--- hddtemp-0.3-beta15/configure.in~ 2005-10-17 19:14:19 +0000
+++ hddtemp-0.3-beta15/configure.in 2006-12-11 18:23:22 +0000
@@ -18,6 +18,7 @@
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(netinet/in.h)
+AC_CHECK_HEADERS(execinfo.h)
AC_CHECK_TYPE(in_addr_t, ,[AC_DEFINE_UNQUOTED([in_addr_t], [uint32_t], [Define to 'uint32_t' if <netinet/in.h> does not define.])], [#include <netinet/in.h>])
# Checks for typedefs, structures, and compiler characteristics.
--- hddtemp-0.3-beta15/src/backtrace.c-orig 2006-12-11 18:20:41 +0000
+++ hddtemp-0.3-beta15/src/backtrace.c 2006-12-11 18:23:28 +0000
@@ -18,7 +18,7 @@
#include <features.h>
-#if defined(__i386__) && defined(__GLIBC__)
+#ifdef HAS_EXECINFO_H
#include <execinfo.h>

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchurl,
}:
let
db = fetchurl {
url = "mirror://savannah/hddtemp/hddtemp.db";
sha256 = "1fr6qgns6qv7cr40lic5yqwkkc7yjmmgx8j0z6d93csg3smzhhya";
};
in
stdenv.mkDerivation rec {
pname = "hddtemp";
version = "0.3-beta15";
src = fetchurl {
url = "mirror://savannah/hddtemp/hddtemp-${version}.tar.bz2";
sha256 = "sha256-YYVBWEBUCT1TvootnoHJcXTzDwCvkcuHAKl+RC1571s=";
};
# from Gentoo
patches = [
./byteswap.patch
./dontwake.patch
./execinfo.patch
./satacmds.patch
];
configureFlags = [
"--with-db-path=${placeholder "out"}/share/hddtemp/hddtemp.db"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
postInstall = ''
install -Dm444 ${db} $out/share/hddtemp/hddtemp.db
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Tool for displaying hard disk temperature";
homepage = "https://savannah.nongnu.org/projects/hddtemp/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
mainProgram = "hddtemp";
};
}

View File

@@ -0,0 +1,26 @@
diff -Naurp hddtemp-0.3-beta15-orig/src/satacmds.c hddtemp-0.3-beta15/src/satacmds.c
--- hddtemp-0.3-beta15-orig/src/satacmds.c 2007-02-10 14:25:15.000000000 +0100
+++ hddtemp-0.3-beta15/src/satacmds.c 2007-02-10 14:26:53.000000000 +0100
@@ -54,7 +54,6 @@ int sata_pass_thru(int device, unsigned
unsigned char cdb[16];
unsigned char sense[32];
int dxfer_direction;
- int ret;
memset(cdb, 0, sizeof(cdb));
cdb[0] = ATA_16;
@@ -78,13 +77,7 @@ int sata_pass_thru(int device, unsigned
cdb[6] = cmd[1];
cdb[14] = cmd[0];
- ret = scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction);
-
- /* Verify SATA magics */
- if (sense[0] != 0x72 || sense[7] != 0x0e || sense[9] != 0x0e || sense[10] != 0x00)
- return 1;
- else
- return ret;
+ return scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction);
}
void sata_fixstring(unsigned char *s, int bytecount)

View File

@@ -0,0 +1,103 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
libjpeg,
uselibtirpc ? stdenv.hostPlatform.isLinux,
libtirpc,
zlib,
szipSupport ? false,
szip,
javaSupport ? false,
jdk,
fortranSupport ? false,
gfortran,
netcdfSupport ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hdf";
version = "4.3.0";
src = fetchFromGitHub {
owner = "HDFGroup";
repo = "hdf4";
tag = "hdf${finalAttrs.version}";
hash = "sha256-Q2VKwkp/iroStrOnwHI8d/dtMWkMoJesBVBVChwNa30=";
};
nativeBuildInputs = [
cmake
ninja
]
++ lib.optional fortranSupport gfortran;
buildInputs = [
libjpeg
zlib
]
++ lib.optional javaSupport jdk
++ lib.optional szipSupport szip
++ lib.optional uselibtirpc libtirpc;
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeBool "HDF4_BUILD_TOOLS" true)
(lib.cmakeBool "HDF4_BUILD_UTILS" true)
(lib.cmakeBool "HDF4_BUILD_WITH_INSTALL_NAME" true)
(lib.cmakeBool "HDF4_ENABLE_JPEG_LIB_SUPPORT" true)
(lib.cmakeBool "HDF4_ENABLE_Z_LIB_SUPPORT" true)
(lib.cmakeBool "HDF4_ENABLE_NETCDF" netcdfSupport)
(lib.cmakeBool "HDF4_BUILD_FORTRAN" fortranSupport)
(lib.cmakeBool "HDF4_ENABLE_SZIP_SUPPORT" szipSupport)
(lib.cmakeBool "HDF4_ENABLE_SZIP_ENCODING" szipSupport)
(lib.cmakeBool "HDF4_BUILD_JAVA" javaSupport)
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
]
++ lib.optionals javaSupport [
(lib.cmakeFeature "JAVA_HOME" "${jdk}")
]
++ lib.optionals fortranSupport [
(lib.cmakeFeature "CMAKE_Fortran_FLAGS" "-fallow-argument-mismatch")
]
# using try_run would set these, but that requires a cross-compiling emulator to be available
# instead, we mark them as if the try_run calls returned a non-zero exit code
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
(lib.cmakeFeature "TEST_LFS_WORKS_RUN" "1")
(lib.cmakeFeature "H4_PRINTF_LL_TEST_RUN" "1")
(lib.cmakeFeature "H4_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT" "")
];
doCheck = true;
outputs = [
"bin"
"dev"
"out"
];
postInstall = ''
moveToOutput bin "$bin"
'';
passthru = {
inherit
uselibtirpc
libtirpc
szipSupport
szip
javaSupport
jdk
;
};
meta = with lib; {
description = "Data model, library, and file format for storing and managing data";
homepage = "https://support.hdfgroup.org/products/hdf4/";
maintainers = [ ];
platforms = platforms.unix;
license = licenses.bsdOriginal;
};
})

View File

@@ -0,0 +1,13 @@
prefix=@out@
includedir=${prefix}/include
libdir=${prefix}/lib
Name: blosc_filter
Description: Blosc Filter
URL: http://blosc.org/
Version: @version@
Requires: \
blosc \
hdf5
Cflags: -isystem${includedir}
Libs: -L${libdir} -Wl,-rpath,${libdir} -lblosc_filter

View File

@@ -0,0 +1,29 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ec0f23..35953d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,15 +24,6 @@ message("BLOSC_INSTALL_DIR='${BLOSC_INSTALL_DIR}'")
message("BLOSC_CMAKE_ARGS='${BLOSC_CMAKE_ARGS}'")
message("GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
-ExternalProject_Add(project_blosc
- PREFIX ${BLOSC_PREFIX}
- GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
- GIT_TAG main
- INSTALL_DIR ${BLOSC_INSTALL_DIR}
- CMAKE_ARGS ${BLOSC_CMAKE_ARGS}
-)
-
-
# sources
set(SOURCES src/blosc_filter.c)
set(PLUGIN_SOURCES src/blosc_filter.c src/blosc_plugin.c )
@@ -56,7 +47,6 @@ include_directories(${HDF5_INCLUDE_DIRS})
# add blosc libraries
add_library(blosc_shared SHARED IMPORTED)
set_property(TARGET blosc_shared PROPERTY IMPORTED_LOCATION ${BLOSC_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}blosc${CMAKE_SHARED_LIBRARY_SUFFIX})
-add_dependencies(blosc_shared project_blosc)
include_directories(${BLOSC_INSTALL_DIR}/include)
add_library(blosc_filter_shared SHARED ${SOURCES})

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
c-blosc,
cmake,
hdf5,
fetchFromGitHub,
nix-update-script,
}:
stdenv.mkDerivation rec {
pname = "hdf5-blosc";
version = "1.0.1";
src = fetchFromGitHub {
owner = "Blosc";
repo = "hdf5-blosc";
rev = "v${version}";
sha256 = "sha256-pM438hUEdzdZEGYxoKlBAHi1G27auj9uGSeiXwVPAE8=";
};
patches = [ ./no-external-blosc.patch ];
outputs = [
"out"
"dev"
"plugin"
];
nativeBuildInputs = [ cmake ];
buildInputs = [
c-blosc
hdf5
];
preConfigure = ''
substituteInPlace CMakeLists.txt --replace-fail 'set(BLOSC_INSTALL_DIR "''${CMAKE_CURRENT_BINARY_DIR}/blosc")' 'set(BLOSC_INSTALL_DIR "${c-blosc}")'
'';
cmakeFlags = [
"-DPLUGIN_INSTALL_PATH=${placeholder "plugin"}/hdf5/lib/plugin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DBUILD_TESTS=ON"
];
postInstall = ''
mkdir -p $out/lib/pkgconfig
substituteAll ${./blosc_filter.pc.in} $out/lib/pkgconfig/blosc_filter.pc
'';
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Filter for HDF5 that uses the Blosc compressor";
homepage = "https://github.com/Blosc/hdf5-blosc";
license = licenses.mit;
maintainers = with maintainers; [ bhipple ];
};
}

View File

@@ -0,0 +1,38 @@
From e5eb394458e19ce8f8a231e8b2005c80c64fd426 Mon Sep 17 00:00:00 2001
From: Jiajie Chen <c@jia.je>
Date: Fri, 15 Jul 2022 10:13:23 +0800
Subject: [PATCH] Hardcode isUbuntu=false to avoid hostname dependency.
The original build.xml detects whether the system is ubuntu based on its
hostname, which is useless in nixpkgs and brings additional dependency.
As suggested by @risicle in #180613, we can simply hardcode isUbuntu to
false.
Signed-off-by: Jiajie Chen <c@jia.je>
---
build.xml | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/build.xml b/build.xml
index c4f0974..15a6078 100644
--- a/build.xml
+++ b/build.xml
@@ -143,11 +143,9 @@
</and>
</condition>
- <exec executable="hostname" outputproperty="computer.hostname"/>
-
- <condition property="isUbuntu">
- <contains string="${computer.hostname}" substring="ubuntu" />
- </condition>
+ <!-- Since we do not package .deb nor .rpm files, we can safely
+ hardcode isUbuntu = false. -->
+ <property name="isUbuntu" value="false" />
<!-- Build 64-bit binary.
Note: os.arch gives the architecture of the JVM, NOT the OS;
--
2.36.1

View File

@@ -0,0 +1,49 @@
diff --git i/build.xml w/build.xml
index 3bbd89b..5834e7c 100644
--- i/build.xml
+++ w/build.xml
@@ -1607,14 +1607,6 @@
<!-- package args for fixed jpackage -->
<target name="createJXPackageMac" depends="createJPackageBase" if="${isXMac}">
- <!-- unlock keychain -->
- <exec executable="security" dir="${dist.dir}" failonerror="true">
- <arg value="unlock-keychain" />
- <arg value="-p" />
- <arg value="${pass.keychain_key}" />
- <arg value="${name.keychain_key}" />
- </exec>
-
<echo> JXPackage the mac application</echo>
<exec executable="${java.home}/bin/jpackage">
<!-- Basic usage -->
@@ -1680,7 +1672,6 @@
<arg value="dmg" />
<arg value="--icon" />
<arg value="${basedir}/package_files/macosx/HDFView.icns" />
- <arg value="--mac-sign" />
<arg value="--mac-package-identifier" />
<arg value="HDFView.hdfgroup.org" />
<arg value="--mac-package-name" />
@@ -2054,13 +2045,6 @@
description="Create the final package for distribution" />
<target name="createJPackageMac" depends="createJPackageBase" if="${isAppMac}">
- <!-- unlock keychain -->
- <exec executable="security" dir="${dist.dir}" failonerror="true">
- <arg value="unlock-keychain" />
- <arg value="-p" />
- <arg value="${pass.keychain_key}" />
- <arg value="${name.keychain_key}" />
- </exec>
<echo> Create the mac jpackage</echo>
<exec executable="${java.home}/bin/jpackage">
@@ -2116,7 +2100,6 @@
<arg value="app-image" />
<arg value="--icon" />
<arg value="${basedir}/package_files/macosx/HDFView.icns" />
- <arg value="--mac-sign" />
<arg value="--mac-package-identifier" />
<arg value="HDFView.hdfgroup.org" />
<arg value="--mac-package-name" />

View File

@@ -0,0 +1,112 @@
{
lib,
stdenv,
fetchFromGitHub,
ant,
jdk,
hdf4,
hdf5,
makeDesktopItem,
copyDesktopItems,
strip-nondeterminism,
stripJavaArchivesHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hdfview";
version = "3.3.2";
src = fetchFromGitHub {
owner = "HDFGroup";
repo = "hdfview";
tag = "v${finalAttrs.version}";
sha256 = "sha256-aJHeknkF38qDH9l+vuzdKFZZTcs/XMjtlHuu/LTF124=";
};
patches = [
# Hardcode isUbuntu=false to avoid calling hostname to detect os
./0001-Hardcode-isUbuntu-false-to-avoid-hostname-dependency.patch
# Disable signing on macOS
./disable-mac-signing.patch
# Remove timestamp comment from generated versions.properties file
./remove-properties-timestamp.patch
];
nativeBuildInputs = [
ant
jdk
copyDesktopItems
strip-nondeterminism
stripJavaArchivesHook
];
HDFLIBS = (hdf4.override { javaSupport = true; }).out;
HDF5LIBS = (hdf5.override { javaSupport = true; }).out;
buildPhase =
let
arch = if stdenv.hostPlatform.isx86_64 then "x86_64" else "aarch64";
in
''
runHook preBuild
ant createJPackage -Dmachine.arch=${arch}
runHook postBuild
'';
desktopItem = makeDesktopItem rec {
name = "HDFView";
desktopName = name;
exec = name;
icon = name;
comment = finalAttrs.finalPackage.meta.description;
categories = [
"Science"
"DataVisualization"
];
};
installPhase = ''
runHook preInstall
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/bin $out/lib
cp -a build/dist/HDFView/bin/HDFView $out/bin/
cp -a build/dist/HDFView/lib/app $out/lib/
cp -a build/dist/HDFView/lib/libapplauncher.so $out/lib/
ln -s ${jdk}/lib/openjdk $out/lib/runtime
mkdir -p $out/share/applications $out/share/icons/hicolor/32x32/apps
cp src/HDFView.png $out/share/icons/hicolor/32x32/apps/
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
cp -a build/dist/HDFView.app $out/Applications/
''
+ ''
runHook postInstall
'';
preFixup = ''
# Remove build timestamp from javadoc files
find $out/lib/app{,/mods}/doc/javadocs -name "*.html" -exec strip-nondeterminism --type javadoc {} +
'';
meta = {
description = "Visual tool for browsing and editing HDF4 and HDF5 files";
license = lib.licenses.free; # BSD-like
homepage = "https://www.hdfgroup.org/downloads/hdfview";
downloadPage = "https://github.com/HDFGroup/hdfview";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ jiegec ];
mainProgram = "HDFView";
# Startup issue is described here:
# https://github.com/NixOS/nixpkgs/issues/340048 A possible solution is
# suggested here:
# https://forum.hdfgroup.org/t/building-hdfview-3-1-0-on-centos-6-swt-library-not-found/5698
# But it requires us to update swt, which is a bit hard, the swt update is tracked here:
# https://github.com/NixOS/nixpkgs/issues/219771
broken = true;
};
})

View File

@@ -0,0 +1,14 @@
diff --git a/build.xml b/build.xml
index fcc4931..2afeb6c 100644
--- a/build.xml
+++ b/build.xml
@@ -345,6 +345,9 @@
<entry key="HDF5_VERSION" value="${hdf5.version}"/>
<entry key="HDFVIEW_VERSION" value="${app.version}"/>
</propertyfile>
+ <exec executable="sed" failonerror="true">
+ <arg line="-i /#/d ${classes.dir}/hdf/versions.properties" />
+ </exec>
</target>
<target name="compile" depends="clean, create-property-file, compileobj, compilehdf4, compilefits, compilenc2, compilehdf5">

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchurl,
libhdhomerun,
pkg-config,
gtk2,
}:
stdenv.mkDerivation rec {
pname = "hdhomerun-config-gui";
version = "20250506";
src = fetchurl {
url = "https://download.silicondust.com/hdhomerun/hdhomerun_config_gui_${version}.tgz";
sha256 = "sha256-bmAdPR5r2mKCncQSSHZ6GYtAk3scHpatnmXGy+a/654=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gtk2
libhdhomerun
];
configureFlags = [ "CPPFLAGS=-I${libhdhomerun}/include/hdhomerun" ];
makeFlags = [ "SUBDIRS=src" ];
installPhase = ''
runHook preInstall
install -vDm 755 src/hdhomerun_config_gui $out/bin/hdhomerun_config_gui
runHook postInstall
'';
meta = with lib; {
description = "GUI for configuring Silicondust HDHomeRun TV tuners";
homepage = "https://www.silicondust.com/support/linux";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = [ maintainers.louisdk1 ];
mainProgram = "hdhomerun_config_gui";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "hdl-dump";
version = "unstable-2022-09-19";
src = fetchFromGitHub {
owner = "ps2homebrew";
repo = "hdl-dump";
rev = "87d3099d2ba39a15e86ebc7dc725e8eaa49f2d5f";
hash = "sha256-eBqF4OGEaLQXQ4JMtD/Yn+f97RzKVsnC+4oyiEhLTUM=";
};
makeFlags = [ "RELEASE=yes" ];
installPhase = ''
install -Dm755 hdl_dump -t $out/bin
'';
meta = with lib; {
homepage = "https://github.com/ps2homebrew/hdl-dump";
description = "PlayStation 2 HDLoader image dump/install utility";
platforms = platforms.linux;
license = licenses.gpl2Only;
maintainers = with maintainers; [ makefu ];
mainProgram = "hdl_dump";
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenvNoCC,
fetchurl,
makeWrapper,
# TODO: for jre 17+, we'll need a workaround:
# https://gitlab.com/hdos/issues/-/issues/2004
openjdk11,
makeDesktopItem,
copyDesktopItems,
libGL,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "hdos";
version = "8";
src = fetchurl {
url = "https://cdn.hdos.dev/launcher/v${finalAttrs.version}/hdos-launcher.jar";
hash = "sha256-00ddeR+ov6Tjrn+pscXoao4C0ek/iP9Hdlgq946pL8A=";
};
dontUnpack = true;
desktop = makeDesktopItem {
name = "HDOS";
type = "Application";
exec = "hdos";
icon = fetchurl {
url = "https://raw.githubusercontent.com/flathub/dev.hdos.HDOS/8e17cbecb06548fde2c023032e89ddf30befeabc/dev.hdos.HDOS.png";
hash = "sha256-pqLNJ0g7GCPotgEPfw2ZZOqapaCRAsJxB09INp6Y6gM=";
};
comment = "HDOS is a client for Old School RuneScape that emulates the era of 2008-2011 RuneScape HD";
desktopName = "HDOS";
genericName = "Oldschool Runescape";
categories = [ "Game" ];
};
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
installPhase = ''
runHook preInstall
makeWrapper ${lib.getExe openjdk11} $out/bin/hdos \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
--add-flags "-jar $src"
runHook postInstall
'';
desktopItems = [ finalAttrs.desktop ];
passthru.updateScript = ./update.sh;
meta = {
description = "High Detail Old School Runescape Client";
homepage = "https://hdos.dev";
changelog = "https://hdos.dev/changelog";
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
license = lib.licenses.unfree;
platforms = openjdk11.meta.platforms;
maintainers = [ lib.maintainers.misterio77 ];
};
})

7
pkgs/by-name/hd/hdos/update.sh Executable file
View File

@@ -0,0 +1,7 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p common-updater-scripts findutils
set -euo pipefail
version="$(curl -s https://cdn.hdos.dev/client/getdown.txt | grep 'launcher.version = ' | cut -d '=' -f2 | xargs)"
update-source-version hdos "$version"

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hdparm";
version = "9.65";
src = fetchurl {
url = "mirror://sourceforge/hdparm/hdparm-${finalAttrs.version}.tar.gz";
sha256 = "sha256-0Ukp+RDQYJMucX6TgkJdR8LnFEI1pTcT1VqU995TWks=";
};
makeFlags = [
"sbindir=${placeholder "out"}/sbin"
"manprefix=${placeholder "out"}"
];
meta = with lib; {
description = "Tool to get/set ATA/SATA drive parameters under Linux";
homepage = "https://sourceforge.net/projects/hdparm/";
platforms = platforms.linux;
license = licenses.bsd2;
mainProgram = "hdparm";
maintainers = [ ];
};
})

View File

@@ -0,0 +1,112 @@
{
lib,
stdenv,
rust,
rustPlatform,
hdr10plus_tool,
cargo-c,
fontconfig,
}:
let
inherit (lib) optionals concatStringsSep;
inherit (rust.envVars) setEnv;
in
rustPlatform.buildRustPackage (finalAttrs: {
__structuredAttrs = true;
pname = "hdr10plus";
# Version of the library, not the tool
# See https://github.com/quietvoid/hdr10plus_tool/blob/main/hdr10plus/Cargo.toml
version = "2.1.4";
outputs = [
"out"
"dev"
];
inherit (hdr10plus_tool) src cargoDeps cargoHash;
nativeBuildInputs = [ cargo-c ];
buildInputs = [ fontconfig ];
cargoCFlags = [
"--package=hdr10plus"
"--frozen"
"--prefix=${placeholder "out"}"
"--includedir=${placeholder "dev"}/include"
"--pkgconfigdir=${placeholder "dev"}/lib/pkgconfig"
"--target=${stdenv.hostPlatform.rust.rustcTarget}"
];
# mirror Cargo flags
cargoCBuildFlags =
optionals (finalAttrs.cargoBuildType != "debug") [
"--profile=${finalAttrs.cargoBuildType}"
]
++ optionals (finalAttrs.cargoBuildNoDefaultFeatures) [
"--no-default-features"
]
++ optionals (finalAttrs.cargoBuildFeatures != [ ]) [
"--features=${concatStringsSep "," finalAttrs.cargoBuildFeatures}"
];
cargoCTestFlags =
optionals (finalAttrs.cargoCheckType != "debug") [
"--profile=${finalAttrs.cargoCheckType}"
]
++ optionals (finalAttrs.cargoCheckNoDefaultFeatures) [
"--no-default-features"
]
++ optionals (finalAttrs.cargoCheckFeatures != [ ]) [
"--features=${concatStringsSep "," finalAttrs.cargoCheckFeatures}"
];
configurePhase = ''
runHook preConfigure
# let stdenv handle stripping
export "CARGO_PROFILE_''${cargoBuildType@U}_STRIP"=false
prependToVar cargoCFlags -j "$NIX_BUILD_CORES"
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
${setEnv} cargo cbuild "''${cargoCFlags[@]}" "''${cargoCBuildFlags[@]}"
runHook postBuild
'';
checkPhase = ''
runHook preCheck
${setEnv} cargo ctest "''${cargoCFlags[@]}" "''${cargoCTestFlags[@]}"
runHook postCheck
'';
installPhase = ''
runHook preInstall
${setEnv} cargo cinstall "''${cargoCFlags[@]}" "''${cargoCBuildFlags[@]}"
runHook postInstall
'';
passthru.tests = {
inherit hdr10plus_tool;
};
meta = {
description = "Library to work with HDR10+ in HEVC files";
homepage = "https://github.com/quietvoid/hdr10plus_tool";
changelog = "https://github.com/quietvoid/hdr10plus_tool/releases/tag/${hdr10plus_tool.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ mvs ];
pkgConfigModules = [ "hdr10plus-rs" ];
};
})

View File

@@ -0,0 +1,61 @@
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
fontconfig,
writableTmpDirAsHomeHook,
writeShellApplication,
hdr10plus,
nixVersions,
nix-update,
tomlq,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "hdr10plus_tool";
version = "1.7.1";
src = fetchFromGitHub {
owner = "quietvoid";
repo = "hdr10plus_tool";
tag = finalAttrs.version;
hash = "sha256-Lpm770Eb81L+eEzHUD+0+J3iS9CFdSP3odhw6KDtgAI=";
};
cargoHash = "sha256-Qkl02HAC6PVCHW226R6StmzrGZv/IHcE88kEg9BpObs=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ fontconfig ];
nativeCheckInputs = [ writableTmpDirAsHomeHook ];
preCheck = ''
export FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
'';
passthru.updateScript = lib.getExe (writeShellApplication {
name = "update-${finalAttrs.pname}";
runtimeInputs = [
nixVersions.latest
nix-update
tomlq
];
text = ''
nix-update ${finalAttrs.pname}
src="$(nix eval -f . --raw ${finalAttrs.pname}.src)"
libver="$(tq -f "$src/hdr10plus/Cargo.toml" package.version)"
nix-update ${hdr10plus.pname} --version "$libver"
'';
});
meta = {
description = "CLI utility to work with HDR10+ in HEVC files";
homepage = "https://github.com/quietvoid/hdr10plus_tool";
changelog = "https://github.com/quietvoid/hdr10plus_tool/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ johnrtitor ];
mainProgram = "hdr10plus_tool";
};
})

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hdrhistogram_c";
version = "0.11.9";
src = fetchFromGitHub {
owner = "HdrHistogram";
repo = "HdrHistogram_c";
tag = finalAttrs.version;
hash = "sha256-9Xp+gPqJpB7xZr5dzyc9Via9gxG9q/EriCx3cm++0kU=";
};
buildInputs = [ zlib ];
nativeBuildInputs = [ cmake ];
doCheck = true;
meta = {
description = "C port or High Dynamic Range (HDR) Histogram";
homepage = "https://github.com/HdrHistogram/HdrHistogram_c";
changelog = "https://github.com/HdrHistogram/HdrHistogram_c/releases/tag/${finalAttrs.version}";
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ jherland ];
};
})

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libsForQt5,
libraw,
exiv2,
zlib,
alglib,
pkg-config,
makeDesktopItem,
copyDesktopItems,
}:
stdenv.mkDerivation rec {
pname = "hdrmerge";
version = "0.5.0-unstable-2024-08-02";
src = fetchFromGitHub {
owner = "jcelaya";
repo = "hdrmerge";
rev = "e2a46f97498b321b232cc7f145461212677200f1";
hash = "sha256-471gJtF9M36pAId9POG8ZIpNk9H/157EdHqXSAPlhN0=";
};
nativeBuildInputs = [
cmake
pkg-config
libsForQt5.wrapQtAppsHook
copyDesktopItems
];
buildInputs = [
libsForQt5.qtbase
libraw
exiv2
zlib
alglib
];
cmakeFlags = [
"-DALGLIB_DIR:PATH=${alglib}"
];
CXXFLAGS = [
# GCC 13: error: 'uint32_t' does not name a type
"-include cstdint"
];
desktopItems = [
(makeDesktopItem {
name = "HDRMerge";
genericName = "HDR raw image merge";
desktopName = "HDRMerge";
comment = meta.description;
icon = "hdrmerge";
exec = "hdrmerge %F";
categories = [ "Graphics" ];
mimeTypes = [
"image/x-dcraw"
"image/x-adobe-dng"
];
terminal = false;
})
];
postInstall = ''
install -Dm444 ../data/images/icon.png $out/share/icons/hicolor/128x128/apps/hdrmerge.png
'';
meta = with lib; {
homepage = "https://github.com/jcelaya/hdrmerge";
description = "Combines two or more raw images into an HDR";
mainProgram = "hdrmerge";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.paperdigits ];
};
}

View File

@@ -0,0 +1,59 @@
{
coreutils,
fetchFromGitHub,
gawk,
hyprland,
jq,
lib,
libnotify,
makeWrapper,
scdoc,
stdenvNoCC,
util-linux,
withHyprland ? true,
}:
stdenvNoCC.mkDerivation rec {
pname = "hdrop";
version = "0.7.8";
src = fetchFromGitHub {
owner = "Schweber";
repo = "hdrop";
rev = "v${version}";
hash = "sha256-JlfSGJBN3aJnZcN8aY464mmADP5boenGQzOxv2sswGc=";
};
nativeBuildInputs = [
makeWrapper
scdoc
];
makeFlags = [ "PREFIX=$(out)" ];
postInstall = ''
wrapProgram $out/bin/hdrop --prefix PATH ':' \
"${
lib.makeBinPath (
[
coreutils
util-linux
jq
libnotify
gawk
]
++ lib.optional withHyprland hyprland
)
}"
'';
meta = {
description = "Emulate 'tdrop' in Hyprland (run, show and hide specific programs per keybind)";
homepage = "https://github.com/Schweber/hdrop";
changelog = "https://github.com/Schweber/hdrop/releases/tag/v${version}";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ Schweber ];
mainProgram = "hdrop";
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
libtool,
pkg-config,
zlib,
serd,
}:
stdenv.mkDerivation rec {
pname = "hdt";
version = "1.3.3";
src = fetchFromGitHub {
owner = "rdfhdt";
repo = "hdt-cpp";
rev = "v${version}";
sha256 = "1vsq80jnix6cy78ayag7v8ajyw7h8dqyad1q6xkf2hzz3skvr34z";
};
patches = [
# Pull fix for gcc-13 compatibility pending upstream inclusion:
# https://github.com/rdfhdt/hdt-cpp/pull/276
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/rdfhdt/hdt-cpp/commit/1b775835c6661c67cb18f5d6f65638ba7d4ecf3c.patch";
hash = "sha256-2ppcA+Ztw5G/buW2cwCNbuGeUuvgvSruW3OarWNCIHI=";
})
];
buildInputs = [
zlib
serd
];
nativeBuildInputs = [
autoreconfHook
libtool
pkg-config
];
enableParallelBuilding = true;
meta = with lib; {
homepage = "http://www.rdfhdt.org/";
description = "Header Dictionary Triples (HDT) is a compression format for RDF data that can also be queried for Triple Patterns";
license = licenses.lgpl21;
platforms = platforms.linux;
maintainers = [ maintainers.koslambrou ];
};
}