aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/commento/default.nix
blob: 636158366c92eea881df7e0ff575507526c8576e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ stdenv, fetchurl, patchelfUnstable, autoPatchelfHook }:
stdenv.mkDerivation rec {
  pname = "commento";
  version = "v1.8.0";
  name = "${pname}-${version}";
  src = fetchurl {
    url = "https://dl.commento.io/release/${name}-linux-glibc-amd64.tar.gz";
    sha256 = "1j88b16hdx3i8nsq56581cscij65slgbsa6yfj73ybbg1585axxs";
  };
  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
  unpackPhase = ''
    tar --one-top-level=${name} -xf "$src"
  '';
  installPhase = ''
    cp -a ${name} $out
  '';
  postFixup = ''
    ${patchelfUnstable}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/commento
  '';
}