about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/luarocks/luarocks-nix.nix
blob: d64e3c91ae7e0f948adfe999f99109788fc27350 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ luarocks
, fetchFromGitHub
, unstableGitUpdater
, nurl
, file
}:

luarocks.overrideAttrs (old: {
  pname = "luarocks-nix";
  version = "0-unstable-2024-04-29";

  src = fetchFromGitHub {
    owner = "nix-community";
    repo = "luarocks-nix";
    rev = "a473a8f479711682f5b97a72362736d96efd463b";
    hash = "sha256-hsjv+jlLsoIDM4gB/0mFeoVu1YZ1I9ELDALLTEnlCF0=";
  };

  propagatedBuildInputs = old.propagatedBuildInputs ++ [
    file
    nurl
  ];

  patches = [ ];

  passthru = {
    updateScript = unstableGitUpdater {
      # tags incompletely inherited from regular luarocks
      hardcodeZeroVersion = true;
    };
  };

  # old.meta // { /* ... */ } doesn't update meta.position, which breaks the updateScript
  meta = {
    inherit (old.meta) description license maintainers platforms;
    mainProgram = "luarocks";
  };
})