mirror of
https://github.com/marcosh/crem.git
synced 2024-09-11 12:36:19 +03:00
remove open-haddock
This commit is contained in:
parent
1ccb45abdc
commit
7cff7bdb24
23
flake.nix
23
flake.nix
@ -93,28 +93,6 @@
|
|||||||
cabal build --write-ghc-environment-files=always
|
cabal build --write-ghc-environment-files=always
|
||||||
cabal test --test-show-details=streaming
|
cabal test --test-show-details=streaming
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open-haddock =
|
|
||||||
let
|
|
||||||
defaultPackage = ".#packages.${system}.default";
|
|
||||||
in
|
|
||||||
pkgs.writeScriptBin "open-haddock" ''
|
|
||||||
pkgName=$(nix eval --raw ${defaultPackage}.name)
|
|
||||||
|
|
||||||
echo Building Haddock documentation for $pkgName
|
|
||||||
docPath=$(nix build --no-link --print-out-paths ${defaultPackage}.doc)
|
|
||||||
|
|
||||||
index="file://$docPath/share/doc/$pkgName/html/index.html"
|
|
||||||
echo "Haddock documentation is available at: $index"
|
|
||||||
|
|
||||||
${
|
|
||||||
if pkgs.stdenv.isLinux
|
|
||||||
then "xdg-open $index"
|
|
||||||
else if pkgs.stdenv.isDarwin
|
|
||||||
then "open $index"
|
|
||||||
else ""
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
packages = {
|
packages = {
|
||||||
@ -142,7 +120,6 @@
|
|||||||
haskell-language-server
|
haskell-language-server
|
||||||
build-watch
|
build-watch
|
||||||
test-watch
|
test-watch
|
||||||
open-haddock
|
|
||||||
pkgs.hpack
|
pkgs.hpack
|
||||||
];
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user