mirror of
https://github.com/0x5eal/luau-unzip.git
synced 2025-04-11 01:30:54 +01:00
chore(nix): bring pesde installation back
Also use nix in CI, although incomplete without installation.
This commit is contained in:
parent
3afd58186c
commit
5ec8f01c09
1 changed files with 28 additions and 2 deletions
30
dev.nix
30
dev.nix
|
@ -10,7 +10,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgs.binutils pkgs.gnutar pkgs.pkg-config lib ];
|
buildInputs = [ pkgs.binutils pkgs.gnutar pkgs.pkg-config lib ];
|
||||||
dontStrip = true; # in order to prevent `set` calls tampering with generated strip script
|
dontStrip = true; # in order to prevent `set` calls tampering with generated strip script
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
@ -24,7 +24,7 @@ let
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
mkdir -p $out/bin $out/lib
|
mkdir -p $out/bin $out/lib
|
||||||
tar -xf ./tmp/data.tar.xz -C $out
|
tar -xf ./tmp/data.tar.xz -C $out
|
||||||
mv $out/usr/bin/${name} $out/bin/
|
mv $out/usr/bin/${name} $out/bin/
|
||||||
|
@ -33,6 +33,26 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fromGithubRelease = { name, exeName, version, sha256, url ? null }:
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
name = "${exeName}-${version}";
|
||||||
|
src = if url != null then
|
||||||
|
pkgs.fetchzip {
|
||||||
|
url = url;
|
||||||
|
sha256 = sha256;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pkgs.fetchzip {
|
||||||
|
url = "https://github.com/${name}/releases/download/v${version}/${exeName}-${version}-linux-x86_64.zip";
|
||||||
|
sha256 = sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${exeName} $out/bin/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -41,6 +61,12 @@ pkgs.mkShell {
|
||||||
pkgs.lune
|
pkgs.lune
|
||||||
(buildDerivation "unzip" "6.0-28" "s9lSnDQ4LMjS5syCmaGFNlBO28KEuRM/++UicEhlBo4=" pkgs.bzip2)
|
(buildDerivation "unzip" "6.0-28" "s9lSnDQ4LMjS5syCmaGFNlBO28KEuRM/++UicEhlBo4=" pkgs.bzip2)
|
||||||
(buildDerivation "zip" "3.0-14" "0vsh9c5wfbwsx1r1b5mkfxj5vy1xqv0wbj2i93jysyb7x1c3pq8n" pkgs.zlib)
|
(buildDerivation "zip" "3.0-14" "0vsh9c5wfbwsx1r1b5mkfxj5vy1xqv0wbj2i93jysyb7x1c3pq8n" pkgs.zlib)
|
||||||
|
(fromGithubRelease {
|
||||||
|
name = "pesde-pkg/pesde";
|
||||||
|
exeName = "pesde";
|
||||||
|
version = "0.6.0-rc.4+registry.0.2.0-rc.1";
|
||||||
|
sha256 = "sha256-3aD2OGUUV4+ptWLTBHVDug9RDHicSM58YDcXCiYRSyY=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue