2020-12-09 16:20:24 +03:00
|
|
|
{ sources ? import ./nix/sources.nix
|
2021-07-26 18:16:45 +03:00
|
|
|
, haskellNix ? import sources.haskellNix { inherit system; }
|
|
|
|
, pkgs ? import haskellNix.sources.nixpkgs-2105 (haskellNix.nixpkgsArgs // { inherit system; })
|
|
|
|
, nix-filter ? import sources.nix-filter
|
|
|
|
, system ? builtins.currentSystem
|
2020-12-09 16:20:24 +03:00
|
|
|
}:
|
2021-07-13 11:53:53 +03:00
|
|
|
let
|
|
|
|
hsPkgs = pkgs.haskell-nix.cabalProject {
|
2021-07-26 18:16:45 +03:00
|
|
|
src = nix-filter {
|
|
|
|
root = ./.;
|
2021-07-13 11:53:53 +03:00
|
|
|
name = "octopod";
|
2021-07-26 18:16:45 +03:00
|
|
|
include = [
|
|
|
|
./octopod-backend/octopod-backend.cabal
|
|
|
|
./octo-cli/octo-cli.cabal
|
|
|
|
./octopod-api/octopod-api.cabal
|
|
|
|
./octopod-common/octopod-common.cabal
|
|
|
|
./octopod-frontend/octopod-frontend.cabal
|
|
|
|
./cabal.project
|
|
|
|
];
|
2020-12-11 16:31:46 +03:00
|
|
|
};
|
2021-07-26 18:16:45 +03:00
|
|
|
|
|
|
|
modules = [
|
|
|
|
{
|
|
|
|
dontStrip = false;
|
|
|
|
dontPatchELF = false;
|
|
|
|
enableDeadCodeElimination = true;
|
|
|
|
packages.octopod-backend.src = ./octopod-backend;
|
|
|
|
packages.octo-cli.src = ./octo-cli;
|
|
|
|
packages.octopod-api.src = ./octopod-api;
|
|
|
|
packages.octopod-frontend.src = ./octopod-frontend;
|
|
|
|
packages.octopod-common.src = ./octopod-common;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2021-07-13 11:53:53 +03:00
|
|
|
index-state = "2021-07-02T00:00:00Z";
|
|
|
|
compiler-nix-name = "ghc8105";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
hsPkgs // {
|
|
|
|
octopod-frontend-pretty =
|
2021-08-05 18:18:06 +03:00
|
|
|
let frontend = hsPkgs.projectCross.ghcjs.hsPkgs.octopod-frontend.components.exes.frontend;
|
|
|
|
in
|
2021-07-13 11:53:53 +03:00
|
|
|
pkgs.runCommand "octopod-frontend-pretty"
|
|
|
|
{ } ''
|
|
|
|
mkdir $out
|
|
|
|
cp ${./octopod-frontend/index.html} $out/index.html
|
2021-08-05 18:18:06 +03:00
|
|
|
cp ${frontend}/bin/frontend.jsexe/all.js $out/all.js
|
|
|
|
cp ${frontend}/bin/frontend.jsexe/all.js.externs $out/all.js.externs
|
2021-07-13 11:53:53 +03:00
|
|
|
'';
|
|
|
|
}
|