diff --git a/.gitignore b/.gitignore index c368d45..23812ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ .stack-work/ -*~ \ No newline at end of file +*~ + +# ---> Nix +result +result-* diff --git a/flake-module.nix b/flake-module.nix new file mode 100644 index 0000000..84d3699 --- /dev/null +++ b/flake-module.nix @@ -0,0 +1,12 @@ +{inputs, ...}: +{ + imports = []; + systems = ["x86_64-linux"]; + perSystem = {pkgs, ...} : + { + packages = rec { + tickLeiste = pkgs.haskellPackages.callPackage ./tickLeiste/tickLeiste.nix {}; + tickLeiste-aeson = pkgs.haskellPackages.callPackage ./tickLeiste-aeson/tickLeiste-aeson.nix {inherit tickLeiste;}; + }; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..39955d4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,63 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1698579227, + "narHash": "sha256-KVWjFZky+gRuWennKsbo6cWyo7c/z/VgCte5pR9pEKg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f76e870d64779109e41370848074ac4eaa1606ec", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1698318101, + "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", + "owner": "NixOs", + "repo": "nixpkgs", + "rev": "63678e9f3d3afecfeafa0acead6239cdb447574c", + "type": "github" + }, + "original": { + "owner": "NixOs", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1696019113, + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..81027ac --- /dev/null +++ b/flake.nix @@ -0,0 +1,11 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable"; + }; + + outputs = inputs@{ flake-parts, ...}: + flake-parts.lib.mkFlake { inherit inputs; } (import ./flake-module.nix); + +} diff --git a/tickLeiste-aeson/default.nix b/tickLeiste-aeson/default.nix new file mode 100644 index 0000000..7a00703 --- /dev/null +++ b/tickLeiste-aeson/default.nix @@ -0,0 +1,2 @@ +{pkgs ? import {}, ...}: +pkgs.haskellPackages.callPackage ./tickLeiste-aeson.nix {} diff --git a/tickLeiste-aeson/tickLeiste-aeson.nix b/tickLeiste-aeson/tickLeiste-aeson.nix new file mode 100644 index 0000000..3c95b1a --- /dev/null +++ b/tickLeiste-aeson/tickLeiste-aeson.nix @@ -0,0 +1,12 @@ +{ mkDerivation, aeson, base, hpack, lib, text, tickLeiste, uuid }: +mkDerivation { + pname = "tickLeiste-aeson"; + version = "0.1.0.0"; + src = ./.; + libraryHaskellDepends = [ aeson base text tickLeiste uuid ]; + libraryToolDepends = [ hpack ]; + testHaskellDepends = [ aeson base text tickLeiste uuid ]; + prePatch = "hpack"; + homepage = "https://github.com/githubuser/tickLeiste-aeson#readme"; + license = lib.licenses.bsd3; +} diff --git a/tickLeiste/default.nix b/tickLeiste/default.nix new file mode 100644 index 0000000..e95ebd2 --- /dev/null +++ b/tickLeiste/default.nix @@ -0,0 +1,2 @@ +{pkgs ? import , ...}: +pkgs.haskellPackages.callPackage ./tickLeiste.nix {} diff --git a/tickLeiste/tickLeiste.nix b/tickLeiste/tickLeiste.nix new file mode 100644 index 0000000..9ad8c2c --- /dev/null +++ b/tickLeiste/tickLeiste.nix @@ -0,0 +1,12 @@ +{ mkDerivation, base, containers, hpack, lib, text, uuid }: +mkDerivation { + pname = "tickLeiste"; + version = "0.1.0.0"; + src = ./.; + libraryHaskellDepends = [ base containers text uuid ]; + libraryToolDepends = [ hpack ]; + testHaskellDepends = [ base containers text uuid ]; + prePatch = "hpack"; + homepage = "https://github.com/githubuser/tickLeiste#readme"; + license = lib.licenses.bsd3; +}