refactor(nix): use tomlplusplus from nixpkgs
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
483a5b6cae
commit
fc11dfd6b4
19
flake.lock
19
flake.lock
@ -52,24 +52,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"libnbtplusplus": "libnbtplusplus",
|
"libnbtplusplus": "libnbtplusplus",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs"
|
||||||
"tomlplusplus": "tomlplusplus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tomlplusplus": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1666091090,
|
|
||||||
"narHash": "sha256-djpMCFPvkJcfynV8WnsYdtwLq+J7jpV1iM4C6TojiyM=",
|
|
||||||
"owner": "marzer",
|
|
||||||
"repo": "tomlplusplus",
|
|
||||||
"rev": "1e4a3833d013aee08f58c5b31c69f709afc69f73",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "marzer",
|
|
||||||
"repo": "tomlplusplus",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -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:PrismLauncher/libnbtplusplus"; flake = false; };
|
libnbtplusplus = { url = "github:PrismLauncher/libnbtplusplus"; flake = false; };
|
||||||
tomlplusplus = { url = "github:marzer/tomlplusplus"; flake = false; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, libnbtplusplus, tomlplusplus, ... }:
|
outputs = { self, nixpkgs, libnbtplusplus, ... }:
|
||||||
let
|
let
|
||||||
# User-friendly version number.
|
# User-friendly version number.
|
||||||
version = builtins.substring 0 8 self.lastModifiedDate;
|
version = builtins.substring 0 8 self.lastModifiedDate;
|
||||||
@ -23,8 +22,8 @@
|
|||||||
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
packagesFn = pkgs: rec {
|
packagesFn = pkgs: rec {
|
||||||
prismlauncher-qt5 = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
prismlauncher-qt5 = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus; };
|
||||||
prismlauncher = pkgs.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
prismlauncher = pkgs.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus; };
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
, glfw
|
, glfw
|
||||||
, openal
|
, openal
|
||||||
, extra-cmake-modules
|
, extra-cmake-modules
|
||||||
|
, tomlplusplus
|
||||||
, ghc_filesystem
|
, ghc_filesystem
|
||||||
, msaClientID ? ""
|
, msaClientID ? ""
|
||||||
, jdks ? [ jdk17 jdk8 ]
|
, jdks ? [ jdk17 jdk8 ]
|
||||||
@ -24,7 +25,6 @@
|
|||||||
, self
|
, self
|
||||||
, version
|
, version
|
||||||
, libnbtplusplus
|
, libnbtplusplus
|
||||||
, tomlplusplus
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
|
|||||||
zlib
|
zlib
|
||||||
quazip
|
quazip
|
||||||
ghc_filesystem
|
ghc_filesystem
|
||||||
|
tomlplusplus
|
||||||
] ++ lib.optional (lib.versionAtLeast qtbase.version "6") qtwayland;
|
] ++ lib.optional (lib.versionAtLeast qtbase.version "6") qtwayland;
|
||||||
|
|
||||||
cmakeFlags = lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
|
cmakeFlags = lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
|
||||||
@ -52,11 +53,6 @@ stdenv.mkDerivation rec {
|
|||||||
ln -s ${libnbtplusplus}/* source/libraries/libnbtplusplus
|
ln -s ${libnbtplusplus}/* source/libraries/libnbtplusplus
|
||||||
chmod -R +r+w source/libraries/libnbtplusplus
|
chmod -R +r+w source/libraries/libnbtplusplus
|
||||||
chown -R $USER: source/libraries/libnbtplusplus
|
chown -R $USER: source/libraries/libnbtplusplus
|
||||||
rm -rf source/libraries/tomlplusplus
|
|
||||||
mkdir source/libraries/tomlplusplus
|
|
||||||
ln -s ${tomlplusplus}/* source/libraries/tomlplusplus
|
|
||||||
chmod -R +r+w source/libraries/tomlplusplus
|
|
||||||
chown -R $USER: source/libraries/tomlplusplus
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
|
Loading…
Reference in New Issue
Block a user