This commit is contained in:
Rachel Lambda Samuelsson 2024-05-22 13:54:24 +02:00
parent 37e88a8d8e
commit 9c59c07224
5 changed files with 79 additions and 26 deletions

58
flake.lock Normal file
View File

@ -0,0 +1,58 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1693428224,
"narHash": "sha256-FWUUlhYqkGEySUD0blTADRiDQ7fw+H1ikivfu88uy+w=",
"path": "/nix/store/3fdrwsy2yi8rwxqylpd6vi2asraxq1nv-source",
"rev": "841889913dfd06a70ffb39f603e29e46f45f0c1a",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

20
flake.nix Normal file
View File

@ -0,0 +1,20 @@
{
description = "kino";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (sys:
let pkgs = import nixpkgs { system = sys; };
hpkgs = pkgs.haskellPackages; # pkgs.haskell.ghc<VERSION>
project = hpkgs.callCabal2nix "kino" ./. { brick = hpkgs.brick_0_70_1; };
in {
packages.default = project;
devShells.default = pkgs.mkShell {
inputsFrom = [ project.env ];
};
}
);
}

View File

@ -1,20 +0,0 @@
{ mkDerivation, aeson, base, brick_0_70_1, bytestring, Clipboard, HTTP
, lens, lens-aeson, lib, microlens, microlens-th, text
, transformers, vty, wreq
}:
mkDerivation {
pname = "kino";
version = "0.1.0.0";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base brick_0_70_1 bytestring Clipboard HTTP lens lens-aeson
microlens microlens-th text transformers vty wreq
];
executableHaskellDepends = [ base ];
testHaskellDepends = [ base ];
description = "A terminal interface to the yts.mx api";
license = lib.licenses.isc;
mainProgram = "kino";
}

1
result Symbolic link
View File

@ -0,0 +1 @@
/nix/store/gg4h3mlpxz00m6hphyb35vznkp8jd7l6-kino-0.1.0.0

View File

@ -1,6 +0,0 @@
let pkgs = import <nixpkgs> {};
in with pkgs; mkShell {
packages = [
(haskellPackages.callPackage ./kino.nix {})
];
}