about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/setserial/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/system/setserial/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/system/setserial/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/system/setserial/default.nix b/nixpkgs/pkgs/tools/system/setserial/default.nix
new file mode 100644
index 000000000000..d224b96d89dc
--- /dev/null
+++ b/nixpkgs/pkgs/tools/system/setserial/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, groff }:
+
+stdenv.mkDerivation rec {
+  pname = "setserial";
+  version = "2.17";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/setserial/${pname}-${version}.tar.gz";
+    sha256 = "0jkrnn3i8gbsl48k3civjmvxyv9rbm1qjha2cf2macdc439qfi3y";
+  };
+
+  nativeBuildInputs = [ groff ];
+
+  installFlags = [ "DESTDIR=$(out)" ];
+
+  postConfigure = ''
+    sed -e s@/usr/man/@/share/man/@ -i Makefile
+  '';
+
+  preInstall = ''mkdir -p "$out/bin" "$out/share/man/man8"'';
+
+  meta = {
+    description = "Serial port configuration utility";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.gpl2;
+    mainProgram = "setserial";
+  };
+}