Less lazy packaging
This commit is contained in:
parent
72d7493ba6
commit
1280e65031
33
flake.nix
33
flake.nix
|
@ -1,9 +1,4 @@
|
||||||
# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
|
{ description = "generate a index of gemtext files";
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
{
|
|
||||||
description = "generate a index of gemtext files";
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
|
@ -15,30 +10,8 @@
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
haskellPackages = pkgs.haskellPackages;
|
compiler = "ghc94";
|
||||||
|
|
||||||
jailbreakUnbreak = pkg:
|
|
||||||
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
|
|
||||||
|
|
||||||
# DON'T FORGET TO PUT YOUR PACKAGE NAME HERE, REMOVING `throw`
|
|
||||||
packageName = "twin";
|
|
||||||
in {
|
in {
|
||||||
packages.${packageName} =
|
packages.default = pkgs.haskell.packages.${compiler}.callPackage ./package.nix { };
|
||||||
haskellPackages.callCabal2nix packageName self rec {
|
|
||||||
# Dependency overrides go here
|
|
||||||
};
|
|
||||||
|
|
||||||
packages.default = self.packages.${system}.${packageName};
|
|
||||||
defaultPackage = self.packages.${system}.default;
|
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
haskellPackages.haskell-language-server # you must build it with your ghc to work
|
|
||||||
ghcid
|
|
||||||
cabal-install
|
|
||||||
];
|
|
||||||
inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
|
|
||||||
};
|
|
||||||
devShell = self.devShells.${system}.default;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
11
package.nix
Normal file
11
package.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ mkDerivation, base, directory, lib, optparse-applicative }:
|
||||||
|
mkDerivation {
|
||||||
|
pname = "twin";
|
||||||
|
version = "0.1.0.0";
|
||||||
|
src = ./.;
|
||||||
|
isLibrary = false;
|
||||||
|
isExecutable = true;
|
||||||
|
executableHaskellDepends = [ base directory optparse-applicative ];
|
||||||
|
license = lib.licenses.agpl3Plus;
|
||||||
|
mainProgram = "twin";
|
||||||
|
}
|
Loading…
Reference in a new issue