aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-12-19 16:09:55 +0100
committerGitHub <noreply@github.com>2022-12-19 16:09:55 +0100
commitcdf05e74c81e1916131641e4be9362e788ec3617 (patch)
treeafbe70d89da66393bac752819a9f2adea4b1ecb0
parentdf1b7f165662823795626ec82d0f3d53c668a88f (diff)
parentb98b4f10279eb99be0d663afec1dcfa65c9d9205 (diff)
downloadPrismLauncher-cdf05e74c81e1916131641e4be9362e788ec3617.tar.gz
PrismLauncher-cdf05e74c81e1916131641e4be9362e788ec3617.tar.bz2
PrismLauncher-cdf05e74c81e1916131641e4be9362e788ec3617.zip
Merge pull request #647 from Scrumplex/update-flake
-rw-r--r--flake.lock31
-rw-r--r--flake.nix7
-rw-r--r--nix/default.nix14
3 files changed, 15 insertions, 37 deletions
diff --git a/flake.lock b/flake.lock
index 7c0bb2f8..051e1664 100644
--- a/flake.lock
+++ b/flake.lock
@@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
- "lastModified": 1650374568,
- "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
+ "lastModified": 1668681692,
+ "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
- "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
+ "rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
@@ -34,11 +34,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1666057921,
- "narHash": "sha256-VpQqtXdj6G7cH//SvoprjR7XT3KS7p+tCVebGK1N6tE=",
+ "lastModified": 1671417167,
+ "narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "88eab1e431cabd0ed621428d8b40d425a07af39f",
+ "rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7",
"type": "github"
},
"original": {
@@ -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"
}
}
},
diff --git a/flake.nix b/flake.nix
index b1e07c91..5615a758 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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
{
diff --git a/nix/default.nix b/nix/default.nix
index 6050fd37..82ba9c7d 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -2,7 +2,7 @@
, stdenv
, cmake
, jdk8
-, jdk
+, jdk17
, zlib
, file
, wrapQtAppsHook
@@ -16,15 +16,15 @@
, glfw
, openal
, extra-cmake-modules
+, tomlplusplus
, ghc_filesystem
, msaClientID ? ""
-, jdks ? [ jdk jdk8 ]
+, jdks ? [ jdk17 jdk8 ]
# flake
, self
, version
, libnbtplusplus
-, tomlplusplus
}:
stdenv.mkDerivation rec {
@@ -33,13 +33,14 @@ stdenv.mkDerivation rec {
src = lib.cleanSource self;
- nativeBuildInputs = [ extra-cmake-modules cmake file jdk wrapQtAppsHook ];
+ nativeBuildInputs = [ extra-cmake-modules cmake file jdk17 wrapQtAppsHook ];
buildInputs = [
qtbase
qtsvg
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 =