diff --git a/pkgs/tools/system/setserial/default.nix b/pkgs/tools/system/setserial/default.nix index a35c0d249185..2efd0baed894 100644 --- a/pkgs/tools/system/setserial/default.nix +++ b/pkgs/tools/system/setserial/default.nix @@ -1,33 +1,24 @@ -a @ { groff, ... } : -let - fetchurl = a.fetchurl; +{ stdenv, fetchurl, groff }: + +stdenv.mkDerivation rec { + name = "setserial-${version}"; + version = "2.17"; - version = a.lib.attrByPath ["version"] "2.17" a; - buildInputs = with a; [ - groff - ]; -in -rec { src = fetchurl { - url = "mirror://sourceforge/setserial/setserial-${version}.tar.gz"; + url = "mirror://sourceforge/setserial/${name}.tar.gz"; sha256 = "0jkrnn3i8gbsl48k3civjmvxyv9rbm1qjha2cf2macdc439qfi3y"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ groff ]; - installFlags = "DESTDIR=$out"; + installFlags = ''DESTDIR=$(out)''; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "patchPath" "doMakeInstall"]; - - patchPath = a.fullDepEntry ('' + postConfigure = '' sed -e s@/usr/man/@/share/man/@ -i Makefile - '') ["minInit" "doUnpack" "doConfigure"]; + ''; - neededDirs = ["$out/bin" "$out/share/man/man8"]; + preInstall = ''mkdir -p "$out/bin" "$out/share/man/man8"''; - name = "setserial-" + version; meta = { description = "Serial port configuration utility"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d84ac49021b4..587836edd1ca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2972,7 +2972,7 @@ let seccure = callPackage ../tools/security/seccure { }; - setserial = builderDefsPackage (callPackage ../tools/system/setserial) { }; + setserial = callPackage ../tools/system/setserial { }; seqdiag = pythonPackages.seqdiag;