Skip to content

Commit

Permalink
celestia: 1.6.1 -> 1.6.2.2 (#117999)
Browse files Browse the repository at this point in the history
Co-authored-by: Sandro <[email protected]>
  • Loading branch information
hjones2199 and SuperSandro2000 authored Apr 12, 2021
1 parent 8fdeb35 commit 79c3609
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 60 deletions.
80 changes: 21 additions & 59 deletions pkgs/applications/science/astronomy/celestia/default.nix
Original file line number Diff line number Diff line change
@@ -1,75 +1,37 @@
{ lib, stdenv, fetchurl, freeglut, gtk2, gtkglext, libjpeg_turbo, libtheora, libXmu
, lua, libGLU, libGL, pkg-config, perl, autoreconfHook
{ lib, stdenv, fetchFromGitHub, pkg-config, freeglut, gtk2, gtkglext
, libjpeg_turbo, libtheora, libXmu, lua, libGLU, libGL, perl, autoreconfHook
}:

let
name = "celestia-1.6.1";
stdenv.mkDerivation rec {
pname = "celestia";
version = "1.6.2.2";

gcc46Patch = fetchurl {
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-gcc46.patch?h=packages/celestia";
sha256 = "0my7dpyh5wpz5df7bjhwb4db3ci2rn8ib1nkjv15fbp1g76bxfaz";
name = "celestia-1.6.1-gcc46.patch";
src = fetchFromGitHub {
owner = "CelestiaProject";
repo = "Celestia";
rev = version;
sha256 = "1s9fgxh6i3x1sy75y5wcidi2mjrf5xj71dd4n6rg0hkps441sgsp";
};

libpng15Patch = fetchurl {
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng15.patch?h=packages/celestia";
sha256 = "1jrmbwmvs9b6k2b2g4104q22v4vqi0wfpz6hmfhniaq34626jcms";
name = "celestia-1.6.1-libpng15.patch";
};

libpng16Patch = fetchurl {
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng16.patch?h=packages/celestia";
sha256 = "1q85prw4ci6d50lri8w1jm19pghxw96qizf5dl4g0j86rlhlkc8f";
name = "celestia-1.6.1-libpng16.patch";
};

linkingPatch = fetchurl {
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-linking.patch?h=packages/celestia";
sha256 = "1m8xyq26nm352828bp12c3b8f6m9bys9fwfxbfzqppllk7il2f24";
name = "celestia-1.6.1-linking.patch";
};

gcc47Patch = fetchurl {
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/gcc-4.7-fixes.diff?h=packages/celestia";
sha256 = "1na26c7pv9qfv8a981m1zvglhv05r3h8513xqjra91qhhzx8wr8n";
name = "gcc-4.7-fixes.diff";
};
in
stdenv.mkDerivation {
inherit name;

src = fetchurl {
url = "mirror://sourceforge/celestia/${name}.tar.gz";
sha256 = "1i1lvhbgllsh2z8i6jj4mvrjak4a7r69psvk7syw03s4p7670mfk";
};

nativeBuildInputs = [ pkg-config ];
buildInputs = [ freeglut gtk2 gtkglext libjpeg_turbo libtheora libXmu libGLU libGL lua
perl autoreconfHook ];

patchPhase = ''
patch -Np0 -i "${gcc46Patch}"
patch -Np0 -i "${libpng15Patch}"
patch -Np2 -i "${libpng16Patch}"
patch -Np1 -i "${linkingPatch}"
patch -Np1 -i "${gcc47Patch}"
'';
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [
freeglut gtk2 gtkglext lua perl
libjpeg_turbo libtheora libXmu libGLU libGL
];

configureFlags = [
"--with-gtk"
"--with-lua=${lua}"
];

installPhase = ''make MKDIR_P="mkdir -p" install'';

enableParallelBuilding = true;

meta = {
description = "Free space simulation";
meta = with lib; {
homepage = "https://celestia.space/";
license = lib.licenses.gpl2;

platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.peti ];
description = "Real-time 3D simulation of space";
changelog = "https://github.com/CelestiaProject/Celestia/releases/tag/${version}";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ peti ];
platforms = platforms.linux;
};
}
1 change: 0 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29243,7 +29243,6 @@ in

celestia = callPackage ../applications/science/astronomy/celestia {
autoreconfHook = buildPackages.autoreconfHook269;
lua = lua5_1;
inherit (pkgs.gnome2) gtkglext;
};

Expand Down

0 comments on commit 79c3609

Please sign in to comment.