mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
astrolog: switches for using optional ephemeris/atlas files
This commit is contained in:
parent
e3d7768843
commit
b4b9096d66
1 changed files with 22 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
|||
{ lib, stdenv, fetchzip, fetchurl, xorg, gnused }:
|
||||
{ lib, stdenv, fetchzip, fetchurl, xorg, gnused
|
||||
, withBigAtlas ? true
|
||||
, withEphemeris ? true
|
||||
, withMoonsEphemeris ? true
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "astrolog";
|
||||
version = "7.30";
|
||||
|
@ -23,15 +27,30 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1mwvpvfk3lxjcc79zvwl4ypqzgqzipnc01cjldxrmx56xkc35zn7";
|
||||
stripRoot = false;
|
||||
};
|
||||
moonsEphemeris = fetchzip {
|
||||
url = "https://www.astrolog.org/ftp/ephem/moons/sepm.zip";
|
||||
sha256 = "0labcidm8mrwvww93nwpp5738m9ff9q48cqzbgd18xny1jf6f8xd";
|
||||
stripRoot = false;
|
||||
};
|
||||
atlas = fetchurl {
|
||||
url = "http://astrolog.org/ftp/atlas/atlasbig.as";
|
||||
sha256 = "1k8cy8gpcvkwkhyz248qhvrv5xiwp1n1s3b7rlz86krh7vzz01mp";
|
||||
sha256 = "001bmqyldsbk4bdliqfl4a9ydrh1ff13wccvfniwaxlmvkridx2q";
|
||||
};
|
||||
in ''
|
||||
mkdir -p $out/bin $out/astrolog
|
||||
cp -r ${ephemeris}/*.se1 $out/astrolog
|
||||
cp *.as $out/astrolog
|
||||
install astrolog $out/bin
|
||||
${lib.optionalString withBigAtlas "cp ${atlas} $out/astrolog/atlas.as"}
|
||||
${lib.optionalString withEphemeris ''
|
||||
sed -i "/-Yi1/s#\".*\"#\"$out/ephemeris\"#" $out/astrolog/astrolog.as
|
||||
mkdir -p $out/ephemeris
|
||||
cp -r ${ephemeris}/*.se1 $out/ephemeris
|
||||
''}
|
||||
${lib.optionalString withMoonsEphemeris ''
|
||||
sed -i "/-Yi1/s#\".*\"#\"$out/ephemeris\"#" $out/astrolog/astrolog.as
|
||||
mkdir -p $out/ephemeris
|
||||
cp -r ${moonsEphemeris}/*.se1 $out/ephemeris
|
||||
''}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue