~misterio/veraoPFPA-Listas

81abb0aa9bb169526327b4c3063ff26f6dca2892 — Gabriel Fontes 5 months ago 0851468 main
adiciona zip e executaveis na derivação
4 files changed, 11 insertions(+), 8 deletions(-)

M .gitignore
M componentes.txt
R pdf.nix => default.nix
M flake.nix
M .gitignore => .gitignore +1 -0
@@ 1,1 1,2 @@
*.pdf
*.zip

M componentes.txt => componentes.txt +1 -1
@@ 1,4 1,4 @@
13
45
0
0
0

R pdf.nix => default.nix +6 -3
@@ 1,13 1,16 @@
{ stdenv, pandoc, texlive }: stdenv.mkDerivation {
{ stdenv, pandoc, texlive, zip, ghc }: stdenv.mkDerivation {
  pname = "notas-verao-pfpa";
  version = "1.0";
  src = ./.;
  buildInputs = [ pandoc texlive.combined.scheme-small ];
  buildInputs = [ pandoc texlive.combined.scheme-small zip ghc ];
  buildPhase = ''
    pandoc lista.md -o lista.pdf
    zip GabrielSilvaFontes.zip 9-a.hs 9-b.hs lista.pdf
    ghc 9-a.hs
    ghc 9-b.hs
  '';
  installPhase = ''
    mkdir -p $out
    cp lista.pdf $out
    cp *.zip 9-a 9-b $out
  '';
}

M flake.nix => flake.nix +3 -4
@@ 11,20 11,19 @@
      let
        pkgs = import nixpkgs { inherit system overlays; };
        overlay = final: prev: {
          pdf = final.callPackage ./pdf.nix { };
          lista = final.callPackage ./default.nix { };
        };
        overlays = [ overlay ];
      in
      rec {
        packages.pdf = pkgs.pdf;
        defaultPackage = packages.pdf;
        packages.lista = pkgs.lista;
        defaultPackage = packages.lista;

        devShell = pkgs.mkShell {
          inputsFrom = [ defaultPackage ];
          buildInputs = with pkgs; [
            # Haskell toolchain
            ghc
            stack
            # LSP
            haskell-language-server
            # Watch build