nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 installShellFiles,
5 fetchgit,
6 zig_0_14,
7 callPackage,
8 versionCheckHook,
9}:
10
11let
12 zig = zig_0_14;
13in
14stdenv.mkDerivation (finalAttrs: {
15 pname = "lsr";
16 version = "1.0.0";
17
18 src = fetchgit {
19 url = "https://tangled.sh/@rockorager.dev/lsr";
20 rev = "v${finalAttrs.version}";
21 sparseCheckout = [
22 "src"
23 "docs"
24 ];
25 hash = "sha256-VeB0R/6h9FXSzBfx0IgpGlBz16zQScDSiU7ZvTD/Cds=";
26 };
27
28 postPatch = ''
29 ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
30 '';
31
32 nativeBuildInputs = [
33 installShellFiles
34 zig.hook
35 ];
36
37 doInstallCheck = true;
38
39 nativeInstallCheckInputs = [ versionCheckHook ];
40 versionCheckProgramArg = "--version";
41
42 meta = {
43 homepage = "https://tangled.sh/@rockorager.dev/lsr";
44 description = "ls but with io_uring";
45 changelog = "https://tangled.sh/@rockorager.dev/lsr/tags";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ ddogfoodd ];
48 platforms = lib.platforms.linux;
49 mainProgram = "lsr";
50 };
51})