make it a nix flake

This commit is contained in:
Dennis Frieberg 2023-10-30 12:12:46 +01:00
parent fd9e5545f5
commit 5c0134bd06
Signed by: nerf
GPG key ID: 42DED0E2D8F04FB6
8 changed files with 119 additions and 1 deletions

4
.gitignore vendored
View file

@ -1,2 +1,6 @@
.stack-work/ .stack-work/
*~ *~
# ---> Nix
result
result-*

12
flake-module.nix Normal file
View file

@ -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;};
};
};
}

63
flake.lock Normal file
View file

@ -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
}

11
flake.nix Normal file
View file

@ -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);
}

View file

@ -0,0 +1,2 @@
{pkgs ? import <nixpkgs> {}, ...}:
pkgs.haskellPackages.callPackage ./tickLeiste-aeson.nix {}

View file

@ -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;
}

2
tickLeiste/default.nix Normal file
View file

@ -0,0 +1,2 @@
{pkgs ? import <nixpkgs>, ...}:
pkgs.haskellPackages.callPackage ./tickLeiste.nix {}

12
tickLeiste/tickLeiste.nix Normal file
View file

@ -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;
}