diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..fff3647 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ce311f4 --- /dev/null +++ b/flake.nix @@ -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 + project = hpkgs.callCabal2nix "kino" ./. { brick = hpkgs.brick_0_70_1; }; + in { + packages.default = project; + devShells.default = pkgs.mkShell { + inputsFrom = [ project.env ]; + }; + } + ); +} diff --git a/kino.nix b/kino.nix deleted file mode 100644 index c3598b2..0000000 --- a/kino.nix +++ /dev/null @@ -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"; -} diff --git a/result b/result new file mode 120000 index 0000000..050df27 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/gg4h3mlpxz00m6hphyb35vznkp8jd7l6-kino-0.1.0.0 \ No newline at end of file diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 22dcdc2..0000000 --- a/shell.nix +++ /dev/null @@ -1,6 +0,0 @@ -let pkgs = import {}; -in with pkgs; mkShell { - packages = [ - (haskellPackages.callPackage ./kino.nix {}) - ]; -}