Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions elfeed-offline.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
lib,
buildDunePackage,
dream,
cmdliner,
cohttp,
cohttp-lwt-unix,
lwt,
brr,
uri,
uri-sexp,
ptime,
astring,
lwd,
brr-lwd,
alcotest,
syndic,
}:

buildDunePackage (finalAttrs: {
pname = "elfeed-offline";
version = "0.0.1";

src = with lib.fileset; toSource {
root = ./.;
fileset = gitTracked ./.;
};

propagatedBuildInputs = [
dream
cmdliner
cohttp
cohttp-lwt-unix
lwt
brr
uri
uri-sexp
ptime
astring
lwd
brr-lwd
];

doCheck = true;
checkInputs = [
alcotest
syndic
];

meta = {
homepage = "https://github.com/punchagan/elfeed-offline";
description = "Offline reading web interface for the Emacs RSS client Elfeed";
license = lib.licenses.agpl3Only;
};
})
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 88 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
description = "";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
ocamlPackages = prev.ocamlPackages.overrideScope (ocamlFinal: ocamlPrev: {
uri = ocamlPrev.uri.overrideAttrs (prev': {
patches = (prev.patches or []) ++ [
(final.fetchpatch {
url = "https://github.com/punchagan/ocaml-uri/commit/ba6c3e6c36cfaece956190be9469f894f56d3124.patch";
hash = "sha256-LbyrC2npmB1jDUG4okM/hpA5+eNQv+PuExhbFK9gxF8=";
})
];
});
});
})
];
};
in
{
packages = rec {
syndic = with pkgs; with ocamlPackages; buildDunePackage (finalAttrs: {
pname = "syndic";
version = "1.8.0";

src = fetchFromGitHub {
owner = "Cumulus";
repo = "Syndic";
rev = "v${finalAttrs.version}";
hash = "sha256-UQ7EN+pvRjZ3qcdMilUBTuRMehe0ElyIPmqXmB7VN6o=";
};

propagatedBuildInputs = [
ptime
xmlm
uri
];

meta = {
homepage = "https://github.com/Cumulus/Syndic";
description = "RSS and Atom feed parsing";
license = lib.licenses.mit;
};
});
brr-lwd = with pkgs; with ocamlPackages; buildDunePackage (finalAttrs: {
pname = "brr-lwd";
inherit (lwd) version src;

propagatedBuildInputs = [
lwd
brr
];

meta = {
description = "Make reactive webpages in Js_of_ocaml using Brr and Lwd";
license = lib.licenses.mit;
homepage = "https://github.com/let-def/lwd";
};
});

elfeed-offline = pkgs.ocamlPackages.callPackage ./elfeed-offline.nix { inherit syndic brr-lwd; };
default = elfeed-offline;
};

devShells.default = with pkgs; mkShell {
packages = [
pkg-config
openssl
gmp
libev
mkcert
nss
dune
];
};
}
);
}