Added MCreator 2025.2
All checks were successful
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-25.05.tar.gz, https://git.gliroid.com/Pupyrinth/nur-packages) (push) Successful in 1m44s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz, https://git.gliroid.com/Pupyrinth/nur-packages) (push) Successful in 1m44s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz, https://git.gliroid.com/Pupyrinth/nur-packages) (push) Successful in 1m24s
All checks were successful
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-25.05.tar.gz, https://git.gliroid.com/Pupyrinth/nur-packages) (push) Successful in 1m44s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz, https://git.gliroid.com/Pupyrinth/nur-packages) (push) Successful in 1m44s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz, https://git.gliroid.com/Pupyrinth/nur-packages) (push) Successful in 1m24s
This commit is contained in:
74
.github/workflows/build.yml
vendored
74
.github/workflows/build.yml
vendored
@@ -6,10 +6,10 @@ on:
|
||||
- main
|
||||
- master
|
||||
schedule:
|
||||
# rebuild everyday at 2:51
|
||||
# rebuild everyday at 3:25
|
||||
# TIP: Choose a random time here so not all repositories are build at once:
|
||||
# https://www.random.org/clock-times/?num=1&earliest=01%3A00&latest=08%3A00&interval=5&format=html&rnd=new
|
||||
- cron: '51 2 * * *'
|
||||
- cron: "25 3 * * *"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
tests:
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
# The repo name as used in
|
||||
# https://github.com/nix-community/NUR/blob/master/repos.json
|
||||
nurRepo:
|
||||
- <YOUR_REPO_NAME>
|
||||
- https://git.gliroid.com/Pupyrinth/nur-packages
|
||||
# Set this to cache your build results in cachix for faster builds
|
||||
# in CI and for everyone who uses your cache.
|
||||
#
|
||||
@@ -40,37 +40,37 @@ jobs:
|
||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-25.05.tar.gz
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
nix_path: "${{ matrix.nixPath }}"
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||
- name: Setup cachix
|
||||
uses: cachix/cachix-action@v16
|
||||
# Don't replace <YOUR_CACHIX_NAME> here!
|
||||
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
|
||||
with:
|
||||
name: ${{ matrix.cachixName }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- name: Check evaluation
|
||||
run: |
|
||||
nix-env -f . -qa \* --meta --xml \
|
||||
--allowed-uris https://static.rust-lang.org \
|
||||
--option restrict-eval true \
|
||||
--option allow-import-from-derivation true \
|
||||
--drv-path --show-trace \
|
||||
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
|
||||
-I $PWD
|
||||
- name: Build nix packages
|
||||
run: nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
|
||||
- name: Trigger NUR update
|
||||
# Don't replace <YOUR_REPO_NAME> here!
|
||||
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
|
||||
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}"
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
nix_path: "${{ matrix.nixPath }}"
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||
- name: Setup cachix
|
||||
uses: cachix/cachix-action@v16
|
||||
# Don't replace <YOUR_CACHIX_NAME> here!
|
||||
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
|
||||
with:
|
||||
name: ${{ matrix.cachixName }}
|
||||
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
- name: Check evaluation
|
||||
run: |
|
||||
nix-env -f . -qa \* --meta --xml \
|
||||
--allowed-uris https://static.rust-lang.org \
|
||||
--option restrict-eval true \
|
||||
--option allow-import-from-derivation true \
|
||||
--drv-path --show-trace \
|
||||
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
|
||||
-I $PWD
|
||||
- name: Build nix packages
|
||||
run: nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
|
||||
- name: Trigger NUR update
|
||||
# Don't replace <YOUR_REPO_NAME> here!
|
||||
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
|
||||
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}"
|
||||
|
||||
31
README.md
31
README.md
@@ -1,37 +1,10 @@
|
||||
# nur-packages-template
|
||||
|
||||
**A template for [NUR](https://github.com/nix-community/NUR) repositories**
|
||||
|
||||
## Setup
|
||||
|
||||
1. Click on [Use this template](https://github.com/nix-community/nur-packages-template/generate) to start a repo based on this template. (Do _not_ fork it.)
|
||||
2. Add your packages to the [pkgs](./pkgs) directory and to
|
||||
[default.nix](./default.nix)
|
||||
* Remember to mark the broken packages as `broken = true;` in the `meta`
|
||||
attribute, or travis (and consequently caching) will fail!
|
||||
* Library functions, modules and overlays go in the respective directories
|
||||
3. Choose your CI: Depending on your preference you can use github actions (recommended) or [Travis ci](https://travis-ci.com).
|
||||
- Github actions: Change your NUR repo name and optionally add a cachix name in [.github/workflows/build.yml](./.github/workflows/build.yml) and change the cron timer
|
||||
to a random value as described in the file
|
||||
- Travis ci: Change your NUR repo name and optionally your cachix repo name in
|
||||
[.travis.yml](./.travis.yml). Than enable travis in your repo. You can add a cron job in the repository settings on travis to keep your cachix cache fresh
|
||||
5. Change your travis and cachix names on the README template section and delete
|
||||
the rest
|
||||
6. [Add yourself to NUR](https://github.com/nix-community/NUR#how-to-add-your-own-repository)
|
||||
|
||||
## README template
|
||||
|
||||
# nur-packages
|
||||
|
||||
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
||||
|
||||
<!-- Remove this if you don't use github actions -->
|
||||

|
||||

|
||||
|
||||
<!--
|
||||
Uncomment this if you use travis:
|
||||
|
||||
[](https://travis-ci.com/<YOUR_TRAVIS_USERNAME>/nur-packages)
|
||||
-->
|
||||
[](https://<YOUR_CACHIX_CACHE_NAME>.cachix.org)
|
||||
|
||||
-->
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
modules = import ./modules; # NixOS modules
|
||||
overlays = import ./overlays; # nixpkgs overlays
|
||||
|
||||
example-package = pkgs.callPackage ./pkgs/example-package { };
|
||||
mcreator-2025_2 = pkgs.callPackage ./pkgs/mcreator-2025_2 { };
|
||||
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
|
||||
# ...
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{ stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "example-package-${version}";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
buildPhase = "echo echo Hello World > example";
|
||||
installPhase = "install -Dm755 example $out";
|
||||
}
|
||||
100
pkgs/mcreator-2025_2/default.nix
Normal file
100
pkgs/mcreator-2025_2/default.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
gobject-introspection,
|
||||
gdk-pixbuf,
|
||||
libGL,
|
||||
makeWrapper,
|
||||
jdk,
|
||||
cairo,
|
||||
glib,
|
||||
unzip,
|
||||
pkg-config,
|
||||
pango,
|
||||
gtk3,
|
||||
at-spi2-atk,
|
||||
xorg,
|
||||
fetchurl,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mcreator";
|
||||
version = "2025.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/MCreator/MCreator/releases/download/2025.2.28610/MCreator.2025.2.Linux.64bit.tar.gz";
|
||||
hash = "sha256-Jt2IDSUqr9mro+6bpdp4kqG6jTQ6aT0q9RQNLmeGj+I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
jdk
|
||||
cairo
|
||||
glib
|
||||
makeWrapper
|
||||
pkg-config
|
||||
pango
|
||||
gtk3
|
||||
at-spi2-atk
|
||||
xorg.libXtst
|
||||
xorg.libX11
|
||||
gobject-introspection
|
||||
gdk-pixbuf
|
||||
unzip
|
||||
libGL
|
||||
xorg.libXxf86vm
|
||||
];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -dm 0755 $out/share/mcreator
|
||||
rm -r jdk
|
||||
rm mcreator.sh
|
||||
touch mcreator.sh
|
||||
chmod +x mcreator.sh
|
||||
|
||||
cp -rf * $out/share/mcreator/
|
||||
|
||||
install -dm 0755 $out/share/icons/hicolor/64x64
|
||||
cp $out/share/mcreator/icon.png $out/share/icons/hicolor/64x64/mcreator.png
|
||||
|
||||
cat > $out/share/mcreator/mcreator.sh <<EOF
|
||||
export CLASSPATH="$out/share/mcreator/lib/mcreator.jar:$out/share/mcreator/lib/*"
|
||||
cd $out/share/mcreator
|
||||
${jdk}/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED net.mcreator.Launcher "\$1"
|
||||
EOF
|
||||
|
||||
chmod +x $out/share/mcreator/mcreator.sh
|
||||
|
||||
install -dm 0755 $out/share/applications
|
||||
|
||||
cat > $out/share/applications/mcreator.desktop <<EOF
|
||||
[Desktop Entry]
|
||||
Exec=$out/bin/mcreator
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=MCreator
|
||||
Categories=Development;IDE;
|
||||
Comment=MCreator IDE for Minecraft mods
|
||||
Icon=$out/share/icons/hicolor/64x64/mcreator.png
|
||||
EOF
|
||||
|
||||
chmod +x $out/share/applications/mcreator.desktop
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
makeWrapper $out/share/mcreator/mcreator.sh $out/bin/mcreator --prefix PATH : ${lib.makeBinPath [ jdk ]} --set JAVA_HOME ${jdk}/lib/openjdk --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ cairo glib pkg-config pango gtk3 at-spi2-atk xorg.libXtst xorg.libX11 gobject-introspection gdk-pixbuf libGL xorg.libXxf86vm ]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "MCreator is an open-source software used to make Minecraft Java Edition mods, Minecraft Bedrock Edition Add-Ons, resource packs, and data packs using an intuitive easy-to-learn interface or with an integrated code editor. It is used worldwide by Minecraft players, aspiring mod developers, for education, online classes, and STEM workshops. ";
|
||||
homepage = "https://github.com/MCreator/MCreator";
|
||||
license = lib.licenses.gpl3;
|
||||
# maintainers = with lib.maintainers; [];
|
||||
mainProgram = "mocu-xcursor";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user