nix: use nixpkgs's quazip
This commit is contained in:
parent
3ff26d5cfe
commit
283e50e670
@ -5,10 +5,9 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
|
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
|
||||||
libnbtplusplus = { url = "github:multimc/libnbtplusplus"; flake = false; };
|
libnbtplusplus = { url = "github:multimc/libnbtplusplus"; flake = false; };
|
||||||
quazip = { url = "github:stachenov/quazip"; flake = false; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, libnbtplusplus, quazip, ... }:
|
outputs = { self, nixpkgs, libnbtplusplus, ... }:
|
||||||
let
|
let
|
||||||
# Generate a user-friendly version number.
|
# Generate a user-friendly version number.
|
||||||
version = builtins.substring 0 8 self.lastModifiedDate;
|
version = builtins.substring 0 8 self.lastModifiedDate;
|
||||||
@ -23,7 +22,7 @@
|
|||||||
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = forAllSystems (system: { polymc = pkgs.${system}.libsForQt5.callPackage ./packages/nix/polymc { inherit version self quazip libnbtplusplus; }; });
|
packages = forAllSystems (system: { polymc = pkgs.${system}.libsForQt5.callPackage ./packages/nix/polymc { inherit version self libnbtplusplus; }; });
|
||||||
defaultPackage = forAllSystems (system: self.packages.${system}.polymc);
|
defaultPackage = forAllSystems (system: self.packages.${system}.polymc);
|
||||||
|
|
||||||
apps = forAllSystems (system: { polymc = { type = "app"; program = "${self.defaultPackage.${system}}/bin/polymc"; }; });
|
apps = forAllSystems (system: { polymc = { type = "app"; program = "${self.defaultPackage.${system}}/bin/polymc"; }; });
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
, xorg
|
, xorg
|
||||||
, libpulseaudio
|
, libpulseaudio
|
||||||
, qtbase
|
, qtbase
|
||||||
|
, quazip
|
||||||
, libGL
|
, libGL
|
||||||
, msaClientID ? ""
|
, msaClientID ? ""
|
||||||
|
|
||||||
@ -18,7 +19,6 @@
|
|||||||
, self
|
, self
|
||||||
, version
|
, version
|
||||||
, libnbtplusplus
|
, libnbtplusplus
|
||||||
, quazip
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -43,8 +43,8 @@ mkDerivation rec {
|
|||||||
|
|
||||||
src = lib.cleanSource self;
|
src = lib.cleanSource self;
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja file makeWrapper ];
|
nativeBuildInputs = [ cmake ninja jdk file makeWrapper ];
|
||||||
buildInputs = [ qtbase jdk zlib ];
|
buildInputs = [ qtbase quazip zlib ];
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
@ -55,12 +55,11 @@ mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
# Copy submodules inputs
|
# Copy libnbtplusplus
|
||||||
rm -rf source/libraries/{libnbtplusplus,quazip}
|
rm -rf source/libraries/libnbtplusplus
|
||||||
mkdir source/libraries/{libnbtplusplus,quazip}
|
mkdir source/libraries/libnbtplusplus
|
||||||
cp -a ${libnbtplusplus}/* source/libraries/libnbtplusplus
|
cp -a ${libnbtplusplus}/* source/libraries/libnbtplusplus
|
||||||
cp -a ${quazip}/* source/libraries/quazip
|
chmod a+r+w source/libraries/libnbtplusplus/*
|
||||||
chmod a+r+w source/libraries/{libnbtplusplus,quazip}/*
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
Loading…
Reference in New Issue
Block a user