Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 51174e7b7b46
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 73a82dcc4480
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 6, 2019

  1. 2
    Copy the full SHA
    73a82dc View commit details
Showing with 14 additions and 16 deletions.
  1. +14 −16 pkgs/development/tools/misc/luarocks/default.nix
30 changes: 14 additions & 16 deletions pkgs/development/tools/misc/luarocks/default.nix
Original file line number Diff line number Diff line change
@@ -8,26 +8,17 @@
}:

let
s = # Generated upstream information
rec {
baseName="luarocks";
version="2.4.4";
name="${baseName}-${version}";
hash="0d7rl60dwh52qh5pfsphgx5ypp7k190h9ri6qpr2yx9kvqrxyf1r";
url="http://luarocks.org/releases/luarocks-2.4.4.tar.gz";
sha256="0d7rl60dwh52qh5pfsphgx5ypp7k190h9ri6qpr2yx9kvqrxyf1r";
};
buildInputs = [
lua curl makeWrapper which unzip
];
in

stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
stdenv.mkDerivation rec {
pname="luarocks";
version="2.4.4";

src = fetchurl {
inherit (s) url sha256;
url="http://luarocks.org/releases/luarocks-${version}.tar.gz";
sha256="0d7rl60dwh52qh5pfsphgx5ypp7k190h9ri6qpr2yx9kvqrxyf1r";
};

patches = [ ./darwin.patch ];
preConfigure = ''
lua -e "" || {
@@ -41,6 +32,11 @@ stdenv.mkDerivation {
configureFlags="$configureFlags --with-lua-include=$lua_inc"
fi
'';

buildInputs = [
lua curl makeWrapper which
];

postInstall = ''
sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
for i in "$out"/bin/*; do
@@ -73,5 +69,7 @@ stdenv.mkDerivation {
license = licenses.mit ;
maintainers = with maintainers; [raskin teto];
platforms = platforms.linux ++ platforms.darwin;
downloadPage = "http://luarocks.org/releases/";
updateWalker = true;
};
}