nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 rustPlatform,
5 fetchFromGitHub,
6 pkg-config,
7 gitMinimal,
8 openssl,
9 versionCheckHook,
10}:
11
12rustPlatform.buildRustPackage (finalAttrs: {
13 pname = "lstr";
14 version = "0.2.1";
15
16 src = fetchFromGitHub {
17 owner = "bgreenwell";
18 repo = "lstr";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-uaefVDSTphboWW1BP2HkcuMiW87FmnVYxCthlrAKF5Y=";
21 };
22
23 cargoHash = "sha256-UVaqkNV1cNpbCNphk6YMqOz077xY9dUBgCGt7SLIH0U=";
24
25 nativeBuildInputs = [ pkg-config ];
26
27 buildInputs = [ (lib.getDev openssl) ];
28
29 nativeCheckInputs = [ gitMinimal ];
30
31 nativeInstallCheckInputs = [ versionCheckHook ];
32
33 doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
34
35 meta = {
36 description = "Fast, minimalist directory tree viewer written in Rust";
37 homepage = "https://github.com/bgreenwell/lstr";
38 changelog = "https://github.com/bgreenwell/lstr/blob/v${finalAttrs.version}/CHANGELOG.md";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [
41 DieracDelta
42 philiptaron
43 ];
44 mainProgram = "lstr";
45 };
46})