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": {
|
||||
"flake-compat": "flake-compat",
|
||||
"libnbtplusplus": "libnbtplusplus",
|
||||
"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"
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5,10 +5,9 @@
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
flake-compat = { url = "github:edolstra/flake-compat"; 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
|
||||
# User-friendly version number.
|
||||
version = builtins.substring 0 8 self.lastModifiedDate;
|
||||
@ -23,8 +22,8 @@
|
||||
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||
|
||||
packagesFn = pkgs: rec {
|
||||
prismlauncher-qt5 = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
||||
prismlauncher = pkgs.qt6Packages.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; };
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -16,6 +16,7 @@
|
||||
, glfw
|
||||
, openal
|
||||
, extra-cmake-modules
|
||||
, tomlplusplus
|
||||
, ghc_filesystem
|
||||
, msaClientID ? ""
|
||||
, jdks ? [ jdk17 jdk8 ]
|
||||
@ -24,7 +25,6 @@
|
||||
, self
|
||||
, version
|
||||
, libnbtplusplus
|
||||
, tomlplusplus
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
|
||||
zlib
|
||||
quazip
|
||||
ghc_filesystem
|
||||
tomlplusplus
|
||||
] ++ lib.optional (lib.versionAtLeast qtbase.version "6") qtwayland;
|
||||
|
||||
cmakeFlags = lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
|
||||
@ -52,11 +53,6 @@ stdenv.mkDerivation rec {
|
||||
ln -s ${libnbtplusplus}/* source/libraries/libnbtplusplus
|
||||
chmod -R +r+w 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 =
|
||||
|
Loading…
Reference in New Issue
Block a user