Skip to content

Commit

Permalink
ldgallery: 2.0 -> 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyinstarlight authored and Yt committed Sep 28, 2022
1 parent 78c16ea commit cc857c8
Show file tree
Hide file tree
Showing 5 changed files with 4,609 additions and 8,323 deletions.
15 changes: 8 additions & 7 deletions pkgs/tools/graphics/ldgallery/compiler/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# generated with cabal2nix by ./generate.sh
{ mkDerivation, aeson, base, cmdargs, containers, data-ordlist
, directory, fetchgit, filepath, Glob, hpack, parallel-io, process
, safe, lib, text, time, yaml
, directory, fetchgit, filepath, Glob, hpack, lib, parallel-io
, process, safe, text, time, yaml
}:
mkDerivation {
pname = "ldgallery-compiler";
version = "2.0";
version = "2.1";
src = fetchgit {
url = "https://github.com/pacien/ldgallery.git";
sha256 = "1a82wy6ns1434gdba2l04crvr5waf03y02bappcxqci2cfb1cznz";
rev = "e93f7b1eb84c083d67567115284c0002a3a7d5fc";
sha256 = "184zysh5qwkbki8mn0br87h65yi5j39qwnmhz05z3ir9wfiniq4b";
rev = "11bbbae2850b9c45da697a8ed9626495a50a38c0";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/compiler; echo source root reset to $sourceRoot";
Expand All @@ -32,6 +32,7 @@ mkDerivation {
prePatch = "hpack";
homepage = "https://ldgallery.pacien.org";
description = "A static generator which turns a collection of tagged pictures into a searchable web gallery";
license = lib.licenses.agpl3;
maintainers = with lib.maintainers; [ pacien ];
license = lib.licenses.agpl3Only;
mainProgram = "ldgallery";
maintainers = [ lib.maintainers.pacien ];
}
11 changes: 4 additions & 7 deletions pkgs/tools/graphics/ldgallery/viewer/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, pkgs, nodejs-14_x, pandoc, CoreServices }:
{ lib, stdenv, fetchFromGitHub, pkgs, pandoc, CoreServices }:

with lib;

Expand All @@ -9,16 +9,13 @@ let
sourcePkg = fetchFromGitHub {
owner = "pacien";
repo = "ldgallery";
rev = "v2.0";
sha256 = "1a82wy6ns1434gdba2l04crvr5waf03y02bappcxqci2cfb1cznz";
rev = "v2.1";
sha256 = "sha256-i+Boo+Mpx/EL+LBajtOQJfpi4EF5AVtRnGtyXKD2n6A=";
};

nodePackages = import ./node-composition.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;

# some native node dependencies still require NodeJS 12 with Python 2
nodejs = nodejs-14_x;
};

nodePkg = nodePackages.package.override {
Expand All @@ -43,7 +40,7 @@ stdenv.mkDerivation {
mkdir -p "$out/share/ldgallery"
cp -rp "lib/node_modules/ldgallery-viewer/dist" \
"$out/share/ldgallery/viewer/"
cp -rp "lib/node_modules/ldgallery-viewer/examples" \
cp -rp "${sourcePkg}/example" \
"$out/share/ldgallery/viewer/"
mkdir -p "$out/share/man/man7"
Expand Down
7 changes: 3 additions & 4 deletions pkgs/tools/graphics/ldgallery/viewer/generate.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../../.. -i bash -p nodePackages.node2nix
#!nix-shell -I nixpkgs=../../../../.. -i bash -p nodePackages.node2nix wget

# TODO: merge with other node packages in nixpkgs/pkgs/development/node-packages once
# * support for npm projects in sub-directories is added to node2nix:
Expand All @@ -15,16 +15,15 @@ if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
fi

wget https://github.com/pacien/ldgallery/raw/$1/viewer/package.json
wget https://github.com/pacien/ldgallery/raw/$1/viewer/package-lock.json

# Development dependencies are required for this Vue application to build
node2nix \
--node-env ../../../../development/node-packages/node-env.nix \
--development \
--input ./package.json \
--lock ./package-lock.json \
--output node-packages.nix \
--composition node-composition.nix \
--nodejs-14 \
--no-copy-node-env

rm package.json package-lock.json
rm package.json
2 changes: 1 addition & 1 deletion pkgs/tools/graphics/ldgallery/viewer/node-composition.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
# This file has been generated by node2nix 1.11.0. Do not edit!

{pkgs ? import <nixpkgs> {
inherit system;
Expand Down
Loading

0 comments on commit cc857c8

Please sign in to comment.