personal/dotfiles

pkgs/surf.nix in framework
Repositories | Summary | Log | Files | README.md | LICENSE

surf.nix (1511B) download


 1{ pkgs ? import <nixpkgs> { }, configHeader }:
 2
 3with pkgs; stdenv.mkDerivation rec {
 4  name = "surf";
 5  src = fetchurl {
 6    url = https://dl.suckless.org/surf/surf-2.1.tar.gz;
 7    hash = "sha256-cuWCkguiWmRiA+k8LSMx2H8DA3ooiU1sfpmvAO4EMlc=";
 8  };
 9
10  nativeBuildInputs = [
11    pkg-config
12  ];
13
14  buildInputs = [
15    glib
16    gcr
17    gtk3-x11
18    webkitgtk
19    glib-networking
20  ];
21
22  patches = [
23    (pkgs.fetchurl {
24      url = https://surf.suckless.org/patches/homepage/surf-2.0-homepage.diff;
25      hash = "sha256-hYBQeaNc0dCr/lE3c0aQO08q8Z+dB2SFryYGiBGZDzY=";
26    })
27    (pkgs.fetchurl {
28      url = https://surf.suckless.org/patches/history/surf-2.1-history.diff;
29      hash = "sha256-t7uI2SEjcG90xSp9g6lSheE9O+B9kx7Ggu9zlrt5X2o=";
30    })
31    (pkgs.fetchurl {
32      url = https://surf.suckless.org/patches/clipboard-instead-of-primary/surf-clipboard-20200112-a6a8878.diff;
33      hash = "sha256-eDwZ3KwCcETkPufWM52YyLKtVdc+PRNQZC1xI6ZYUFs=";
34    })
35    (pkgs.fetchurl {
36      url = https://surf.suckless.org/patches/searchengines/surf-searchengines-20220804-609ea1c.diff;
37      hash = "sha256-F99gbM9sDDdvDj11J22kn2fu6sIKehD3Ecjm3syb3IU=";
38    })
39    (pkgs.fetchurl {
40      url = https://surf.suckless.org/patches/short-title/surf-short-title-20210206-7dcce9e.diff;
41      hash = "sha256-763QcUq4c3Kj+tqjqrFFksMOuJFrnGg9ESt5eJIcaO4=";
42    })
43  ];
44
45  configurePhase = ''
46    ln -sf ${configHeader} config.h
47  '';
48
49  buildPhase = ''
50    make all
51  '';
52
53  installPhase = ''
54    make PREFIX=$out install
55  '';
56}