about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/web-apps/shaarli/material-theme.nix
blob: 939976b0a2694c8bfa922cddec0141746304287a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
  name = "shaarli-material-${version}";
  version = "0.9.5";

  src = fetchFromGitHub {
    owner = "kalvn";
    repo = "Shaarli-Material";
    rev = "v${version}";
    sha256 = "1bxw74ksvfv46995iwc7jhvl78hd84lcq3h9iyxvs8gpkhkapv55";
  };

  patchPhase = ''
    for f in material/*.html
    do
      substituteInPlace $f \
        --replace '.min.css?v={$version_hash}"' '.min.css#"' \
        --replace '.min.js?v={$version_hash}"'  '.min.js#"' \
        --replace '.png"'     '.png#"'
    done
  '';

  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;
  };
}