2020-05-29 06:06:01 +00:00
|
|
|
|
{ stdenv, lib, fetchurl, skawarePackages }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
pname = "fdtools";
|
2021-09-28 08:13:01 +00:00
|
|
|
|
# When you update, check whether we can drop the skalibs pin.
|
2020-05-29 06:06:01 +00:00
|
|
|
|
version = "2020.05.04";
|
|
|
|
|
sha256 = "0lnafcp4yipi0dl8gh33zjs8wlpz0mim8mwmiz9s49id0b0fmlla";
|
2021-09-28 08:13:01 +00:00
|
|
|
|
skalibs = skawarePackages.skalibs_2_10;
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
|
url = "https://code.dogmap.org/${pname}/releases/${pname}-${version}.tar.bz2";
|
|
|
|
|
inherit sha256;
|
|
|
|
|
};
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
patches = [ ./new-skalibs.patch ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
|
buildInputs = [
|
|
|
|
|
# temporary, until fdtools catches up to skalibs
|
|
|
|
|
skalibs
|
|
|
|
|
];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
|
cd ${pname}-${version}
|
|
|
|
|
sed -e 's|gcc|$CC|' \
|
|
|
|
|
conf-compile/defaults/host_link.sh \
|
|
|
|
|
> conf-compile/host_link.sh
|
2021-03-19 17:17:44 +00:00
|
|
|
|
sed -e 's|gcc|$CC|' \
|
|
|
|
|
conf-compile/defaults/host_compile.sh \
|
|
|
|
|
> conf-compile/host_compile.sh
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
|
echo "${skalibs.lib}/lib/skalibs/sysdeps" \
|
2020-05-29 06:06:01 +00:00
|
|
|
|
> conf-compile/depend_skalibs_sysdeps
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
|
bash package/build
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $bin/bin
|
|
|
|
|
tools=( grabconsole multitee pipecycle recvfd seek0 sendfd setblock setstate statfile vc-get vc-lock vc-switch )
|
|
|
|
|
|
|
|
|
|
for t in "''${tools[@]}"; do
|
|
|
|
|
mv "command/$t" "$bin/bin/$t"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
mkdir -p $lib/lib
|
|
|
|
|
mkdir -p $dev/include
|
|
|
|
|
docdir=$doc/share/doc/${pname}
|
|
|
|
|
mkdir -p $docdir
|
|
|
|
|
|
|
|
|
|
mv library/fdtools.a $lib/lib/fdtools.a
|
|
|
|
|
mv include/fdtools.h $dev/include/fdtools.h
|
|
|
|
|
|
|
|
|
|
${skawarePackages.cleanPackaging.commonFileActions {
|
|
|
|
|
noiseFiles = [
|
|
|
|
|
"conf-compile/**/*"
|
|
|
|
|
"src/**/*"
|
|
|
|
|
"src/.**/*"
|
|
|
|
|
"compile/**/*"
|
|
|
|
|
"package/{build,check,compile,elsewhere,install,install_commands,own,run,sharing,upgrade,upgrade_version,url_src,url_src_latest,versions}"
|
|
|
|
|
];
|
|
|
|
|
docFiles = [
|
|
|
|
|
"package/INSTALL"
|
|
|
|
|
"package/LICENSE"
|
|
|
|
|
"package/README"
|
|
|
|
|
];
|
|
|
|
|
}} $docdir
|
|
|
|
|
|
|
|
|
|
${skawarePackages.cleanPackaging.checkForRemainingFiles}
|
|
|
|
|
|
|
|
|
|
# we don’t use this, but nixpkgs requires it
|
|
|
|
|
touch $out
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = {
|
2022-02-10 20:34:41 +00:00
|
|
|
|
homepage = "https://code.dogmap.org/fdtools/";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
description = "A set of utilities for working with file descriptors";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
license = lib.licenses.gpl2Only;
|
2021-03-23 19:22:30 +00:00
|
|
|
|
platforms = lib.platforms.linux;
|
2020-05-29 06:06:01 +00:00
|
|
|
|
maintainers = [ lib.maintainers.Profpatsch ];
|
|
|
|
|
};
|
|
|
|
|
}
|