From 6fb8e668d951b0e375376d58c4bea6c6c379f9b8 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 18 Jan 2017 19:49:23 +0100 Subject: [PATCH 1/2] shaarli-material: init at 0.8.2 --- .../web-apps/shaarli/material-theme.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/servers/web-apps/shaarli/material-theme.nix diff --git a/pkgs/servers/web-apps/shaarli/material-theme.nix b/pkgs/servers/web-apps/shaarli/material-theme.nix new file mode 100644 index 000000000000..59d16ac0e0fc --- /dev/null +++ b/pkgs/servers/web-apps/shaarli/material-theme.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "shaarli-material-${version}"; + version = "0.8.2"; + + src = fetchFromGitHub { + owner = "kalvn"; + repo = "Shaarli-Material"; + rev = "v${version}"; + sha256 = "1gam080iwr8vd6k6liv0zmpb3zyw37a53nj1s4ywb4d2i68hjncd"; + }; + + patchPhase = '' + for f in material/*.html + do + substituteInPlace $f \ + --replace '.min.css"' '.min.css#"' \ + --replace '.min.js"' '.min.js#"' \ + --replace '.png"' '.png#"' + done + + substituteInPlace material/loginform.html \ + --replace '"ban_canLogin()"' '"ban_canLogin($conf)"' # PHP 7.1 fix (https://github.com/shaarli/Shaarli/issues/711) + ''; + + installPhase = '' + mv material/ $out + ''; + + meta = with stdenv.lib; { + description = "A theme base on Google's Material Design for Shaarli, the superfast delicious clone"; + license = licenses.mit; + homepage = https://github.com/kalvn/Shaarli-Material; + maintainers = with maintainers; [ schneefux ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec04e8e85c26..1a24f5c2e79d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10747,6 +10747,8 @@ in shaarli = callPackage ../servers/web-apps/shaarli { }; + shaarli-material = callPackage ../servers/web-apps/shaarli/material-theme.nix { }; + axis2 = callPackage ../servers/http/tomcat/axis2 { }; unifi = callPackage ../servers/unifi { }; From 1ea0514a2dce5f9cb34e5390205968103a83fa02 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 21 Jan 2017 16:01:08 +0100 Subject: [PATCH 2/2] shaarli-material: 0.8.2 -> 0.8.3 --- pkgs/servers/web-apps/shaarli/material-theme.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/web-apps/shaarli/material-theme.nix b/pkgs/servers/web-apps/shaarli/material-theme.nix index 59d16ac0e0fc..369fecda47aa 100644 --- a/pkgs/servers/web-apps/shaarli/material-theme.nix +++ b/pkgs/servers/web-apps/shaarli/material-theme.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "shaarli-material-${version}"; - version = "0.8.2"; + version = "0.8.3"; src = fetchFromGitHub { owner = "kalvn"; repo = "Shaarli-Material"; rev = "v${version}"; - sha256 = "1gam080iwr8vd6k6liv0zmpb3zyw37a53nj1s4ywb4d2i68hjncd"; + sha256 = "0ivq35183r5vyzvf47sgxwdxllmvhd5w9w75xgyp3kbw2na4yrmr"; }; patchPhase = '' @@ -19,9 +19,6 @@ stdenv.mkDerivation rec { --replace '.min.js"' '.min.js#"' \ --replace '.png"' '.png#"' done - - substituteInPlace material/loginform.html \ - --replace '"ban_canLogin()"' '"ban_canLogin($conf)"' # PHP 7.1 fix (https://github.com/shaarli/Shaarli/issues/711) ''; installPhase = ''