mirror of
https://github.com/0x5eal/luau-unzip.git
synced 2025-04-01 21:30:55 +01:00
chore: include nix configs for devenv
This commit is contained in:
parent
965ddb1164
commit
e57c9d7b29
3 changed files with 79 additions and 0 deletions
33
dev.nix
Normal file
33
dev.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.curl
|
||||
pkgs.git
|
||||
pkgs.lune
|
||||
(let version = "6.0-28"; in pkgs.stdenv.mkDerivation {
|
||||
name = "unzip-${version}";
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://ftp.debian.org/debian/pool/main/u/unzip/unzip_${version}_amd64.deb";
|
||||
sha256 = "13h6cm4708p5zczi7fc4qbdlwl1nhnhrk0ncwv9chb1q6jf55ndk";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgs.binutils pkgs.gnutar pkgs.bzip2 pkgs.pkg-config ];
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir -p tmp/
|
||||
ar x $src
|
||||
mv data.tar.xz tmp/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib
|
||||
tar -xf ./tmp/data.tar.xz -C $out
|
||||
mv $out/usr/bin/unzip $out/bin/
|
||||
cp $(pkg-config --variable=libdir bzip2)/libbz2.so.1.0.8 $out/lib/libbz2.so.1.0
|
||||
rm -rf $out/usr tmp/
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
||||
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739092636,
|
||||
"narHash": "sha256-h3MJZPufyEgYho/eIa6BvCSEMHed5a7j3uPk6dZctuY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d9b16fd85014d20ed53f65b0cf45cbc36b60c3fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "release-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
19
flake.nix
Normal file
19
flake.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
description = "luau-unzip development environment";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
devpkgs = import ./dev.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
in {
|
||||
packages.${system}.devShell = devpkgs;
|
||||
defaultPackage.${system} = devpkgs;
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue