diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
commit | 50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch) | |
tree | f2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/by-name/rs/rs/package.nix | |
parent | 4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff) | |
parent | cfc75eec4603c06503ae750f88cf397e00796ea8 (diff) | |
download | nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2 nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip |
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/rs/rs/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/rs/rs/package.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/rs/rs/package.nix b/nixpkgs/pkgs/by-name/rs/rs/package.nix new file mode 100644 index 000000000000..141d72dfe077 --- /dev/null +++ b/nixpkgs/pkgs/by-name/rs/rs/package.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchurl +, installShellFiles +, libbsd +}: + +stdenv.mkDerivation rec { + pname = "rs"; + version = "20200313"; + + src = fetchurl { + url = "https://www.mirbsd.org/MirOS/dist/mir/rs/${pname}-${version}.tar.gz"; + sha256 = "0gxwlfk7bzivpp2260w2r6gkyl7vdi05cggn1fijfnp8kzf1b4li"; + }; + + nativeBuildInputs = [ installShellFiles ]; + + buildInputs = [ libbsd ]; + + buildPhase = '' + runHook preBuild + + ${stdenv.cc}/bin/cc utf8.c rs.c -o rs -lbsd + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install -Dm 755 rs -t $out/bin + installManPage rs.1 + + runHook postInstall + ''; + + meta = with lib; { + homepage = "http://www.mirbsd.org/htman/i386/man1/rs.htm"; + description = "Reshape a data array from standard input"; + longDescription = '' + rs reads the standard input, interpreting each line as a row of blank- + separated entries in an array, transforms the array according to the op- + tions, and writes it on the standard output. With no arguments (argc < 2) + it transforms stream input into a columnar format convenient for terminal + viewing, i.e. if the length (in bytes!) of the first line is smaller than + the display width, -et is implied, -t otherwise. + + The shape of the input array is deduced from the number of lines and the + number of columns on the first line. If that shape is inconvenient, a more + useful one might be obtained by skipping some of the input with the -k + option. Other options control interpretation of the input columns. + + The shape of the output array is influenced by the rows and cols specifi- + cations, which should be positive integers. If only one of them is a po- + sitive integer, rs computes a value for the other which will accommodate + all of the data. When necessary, missing data are supplied in a manner + specified by the options and surplus data are deleted. There are options + to control presentation of the output columns, including transposition of + the rows and columns. + ''; + license = licenses.bsd3; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +} |