diff options
author | Janik <80165193+Janik-Haag@users.noreply.github.com> | 2023-08-08 14:52:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-08 14:52:14 +0200 |
commit | 777fcd15e2aad6d51531d82c275188dbb5091167 (patch) | |
tree | 889d679d2ed826c4caa6570a7bc08dc71d649904 /pkgs/applications/science | |
parent | c34a0c22fe20ba704f7e04919451b240830e16c6 (diff) | |
parent | 1d410781774c8b35f59555831502d5d02ee87108 (diff) |
Merge pull request #245677 from fsagbuya/linux-gpib
Diffstat (limited to 'pkgs/applications/science')
3 files changed, 72 insertions, 0 deletions
diff --git a/pkgs/applications/science/electronics/linux-gpib/common.nix b/pkgs/applications/science/electronics/linux-gpib/common.nix new file mode 100644 index 0000000000000..e87751a188605 --- /dev/null +++ b/pkgs/applications/science/electronics/linux-gpib/common.nix @@ -0,0 +1,24 @@ +{ pname, fetchurl, lib }: rec { + version = "4.3.6"; + inherit pname; + + src = fetchurl { + url = "mirror://sourceforge/project/linux-gpib/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/${version}/linux-gpib-${version}.tar.gz"; + hash = "sha256-Gze4xrvkhEgn+J5Jhrycezjp2uhlD1v6aX0WGv4J2Jg="; + }; + + unpackPhase = '' + tar xf $src + tar xf linux-gpib-${version}/${pname}-${version}.tar.gz + ''; + + sourceRoot = "${pname}-${version}"; + + meta = with lib; { + description = "Support package for GPIB (IEEE 488) hardware"; + homepage = "https://linux-gpib.sourceforge.io/"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ fsagbuya ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/science/electronics/linux-gpib/kernel.nix b/pkgs/applications/science/electronics/linux-gpib/kernel.nix new file mode 100644 index 0000000000000..d64e2fc81fbdf --- /dev/null +++ b/pkgs/applications/science/electronics/linux-gpib/kernel.nix @@ -0,0 +1,23 @@ +{ lib +, stdenv +, fetchurl +, kernel +, pahole +}: + +stdenv.mkDerivation (import ./common.nix { inherit fetchurl lib; pname = "linux-gpib-kernel"; } // { + + postPatch = '' + sed -i 's@/sbin/depmod -A@@g' Makefile + ''; + + buildInputs = [ pahole ] ++ kernel.moduleBuildDependencies; + + makeFlags = [ + "LINUX_SRCDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; + + installFlags = [ + "INSTALL_MOD_PATH=$(out)" + ]; +}) diff --git a/pkgs/applications/science/electronics/linux-gpib/user.nix b/pkgs/applications/science/electronics/linux-gpib/user.nix new file mode 100644 index 0000000000000..f9c9a2e1e6cbc --- /dev/null +++ b/pkgs/applications/science/electronics/linux-gpib/user.nix @@ -0,0 +1,25 @@ +{ lib +, stdenv +, fetchurl +, autoconf +, libtool +, bison +, flex +, automake +}: + +stdenv.mkDerivation (import ./common.nix { inherit fetchurl lib; pname = "linux-gpib-user"; } // { + + nativeBuildInputs = [ + autoconf + libtool + bison + flex + automake + ]; + + configureFlags = [ + "--sysconfdir=$(out)/etc" + "--prefix=$(out)" + ]; +}) |