Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support rockspec's build_dependencies #32

Merged
merged 8 commits into from
Apr 14, 2024
Merged

Conversation

teto
Copy link
Collaborator

@teto teto commented Oct 22, 2023

first seen in the wild in std.normalize

Fixes #31

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2023

Codecov Report

Merging #32 (24965b4) into master (e94733b) will increase coverage by 0.24%.
Report is 1 commits behind head on master.
The diff coverage is 0.00%.

❗ Current head 24965b4 differs from pull request most recent head 063fd0f. Consider uploading reports for the commit 063fd0f to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master      #32      +/-   ##
==========================================
+ Coverage   81.16%   81.41%   +0.24%     
==========================================
  Files          91       92       +1     
  Lines       11660    11696      +36     
==========================================
+ Hits         9464     9522      +58     
+ Misses       2196     2174      -22     
Files Coverage Δ
src/luarocks/cmd/nix.lua 8.13% <0.00%> (-0.06%) ⬇️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

first seen in the wild in std.normalize
@teto teto force-pushed the fix-build-dependencies branch from 8bdea9c to be4c431 Compare October 22, 2023 00:36
@teto teto mentioned this pull request Oct 22, 2023
18 tasks
@teto teto mentioned this pull request Apr 8, 2024
teto sse added 5 commits April 14, 2024 01:39
now that nix has fixed the issues with unknown platforms, we can enable them in the flake
@teto teto force-pushed the fix-build-dependencies branch from 0acce68 to 2ca252d Compare April 14, 2024 00:24
@teto
Copy link
Collaborator Author

teto commented Apr 14, 2024

Looks like it is working

$ wget https://raw.githubusercontent.com/lua-stdlib/normalize/master/std.normalize-git-1.rockspec 
$ luarocks nix ./std.normalize-git-1.rockspec 
Warning: Lua 5.1 interpreter not found at lua

Modules may not install with the correct configurations. You may want to configure the path prefix to your build of Lua 5.1 using

   luarocks config --local lua_dir <your-lua-prefix>

sh: line 1: lua/lua: No such file or directory
Call to nix-prefetch-git --fetch-submodules --quiet https://github.com/lua-stdlib/normalize.git failed
{ buildLuarocksPackage, fetchgit, ldoc, luaAtLeast, luaOlder, std-_debug }:
buildLuarocksPackage {
  pname = "std.normalize";
  version = "git-1";

  src = fetchgit ( removeAttrs (builtins.fromJSON ''{
  "url": "https://github.com/lua-stdlib/normalize.git",
  "rev": "01307e4e6cc3a2d3eba907d3a6758bcf0f3f09e2",
  "date": "2023-02-03T19:18:59-07:00",
  "path": "/nix/store/wnvhj9mma8j5j5wmgj5ih2c548gvn5ic-normalize",
  "sha256": "0bh8sz8lv67yjkzf4i1a75c4ywdx5rsgf063ixxw0fqrc7kazaz5",
  "hash": "sha256-5auv5mEZO8B7j8MA93QuvXFPWDkqROL+lP6YTdHXCC4=",
  "fetchLFS": false,
  "fetchSubmodules": true,
  "deepClone": false,
  "leaveDotGit": false
}
 '') ["date" "path" "sha256"]) ;

  disabled = luaOlder "5.1" || luaAtLeast "5.5";
  nativeBuildInputs = [ ldoc ];
  propagatedBuildInputs = [ std-_debug ];

  meta = {
    homepage = "https://lua-stdlib.github.io/normalize";
    description = "Normalized Lua Functions";
    license.fullName = "MIT/X11";
  };
}

@teto teto marked this pull request as ready for review April 14, 2024 21:21
@teto teto merged commit ead0138 into master Apr 14, 2024
8 of 10 checks passed
@teto teto deleted the fix-build-dependencies branch April 14, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support build_dependencies
2 participants