2022-05-11 17:26:20 +02:00
|
|
|
{
|
|
|
|
description = "An implementation of the Double Ratchet cryptographic ratchet";
|
|
|
|
|
2022-05-11 20:14:00 +02:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
# We can't use the current stable release because of
|
2022-10-06 21:26:39 +02:00
|
|
|
# https://github.com/emscripten-core/emscripten/issues/16913
|
2022-05-11 17:26:20 +02:00
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
2022-05-11 19:59:33 +02:00
|
|
|
inputs.npmlock2nix = {
|
|
|
|
url = "github:nix-community/npmlock2nix";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-05-11 17:26:20 +02:00
|
|
|
|
2022-05-11 19:59:33 +02:00
|
|
|
outputs = { self, nixpkgs, flake-utils, npmlock2nix }:
|
2023-02-27 00:20:12 +01:00
|
|
|
let
|
|
|
|
localOverlay = import ./nix/overlay.nix;
|
|
|
|
pkgsForSystem = system: import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
npmlock2nix = final.callPackage npmlock2nix {};
|
|
|
|
node_modules = final.npmlock2nix.node_modules { src = ./javascript; };
|
|
|
|
})
|
|
|
|
localOverlay
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in (
|
2022-05-12 23:05:22 +02:00
|
|
|
# some systems cause issues, e.g. i686-linux is unsupported by gradle,
|
|
|
|
# which causes "nix flake check" to fail. Investigate more later, but for
|
|
|
|
# now, we will just allow x86_64-linux
|
2023-02-27 00:20:12 +01:00
|
|
|
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ] (system: rec {
|
|
|
|
legacyPackages = pkgsForSystem system;
|
|
|
|
checks = {
|
|
|
|
inherit (legacyPackages) olm-gcc-cmake olm-clang-cmake olm-gcc-make;
|
|
|
|
};
|
|
|
|
packages = {
|
|
|
|
javascript = legacyPackages.olm-javascript;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
));
|
2022-05-11 17:26:20 +02:00
|
|
|
}
|