4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub, nim, termbox, pcre }:
|
|
|
|
let
|
|
noise = fetchFromGitHub {
|
|
owner = "jangko";
|
|
repo = "nim-noise";
|
|
rev = "db1e86e312413e4348fa82c02340784316a89cc1";
|
|
sha256 = "0n9l2dww5smrsl1xfqxjnxz3f1srb72lc1wl3pdvs6xfyf44qzlh";
|
|
};
|
|
|
|
nimbox = fetchFromGitHub {
|
|
owner = "dom96";
|
|
repo = "nimbox";
|
|
rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b";
|
|
sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1";
|
|
};
|
|
|
|
lscolors = fetchFromGitHub {
|
|
owner = "joachimschmidt557";
|
|
repo = "nim-lscolors";
|
|
rev = "v0.3.3";
|
|
sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4";
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
pname = "nimmm";
|
|
version = "0.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "joachimschmidt557";
|
|
repo = "nimmm";
|
|
rev = "v${version}";
|
|
sha256 = "1zpq181iz6g7yfi298gjwv33b89l4fpnkjprimykah7py5cpw67w";
|
|
};
|
|
|
|
nativeBuildInputs = [ nim ];
|
|
buildInputs = [ termbox pcre ];
|
|
|
|
buildPhase = ''
|
|
export HOME=$TMPDIR;
|
|
nim -p:${noise} -p:${nimbox} -p:${lscolors}/src c -d:release src/nimmm.nim
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -Dt $out/bin src/nimmm
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Terminal file manager written in nim";
|
|
homepage = "https://github.com/joachimschmidt557/nimmm";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.unix;
|
|
maintainers = [ maintainers.joachimschmidt557 ];
|
|
};
|
|
}
|