From b4e23cecd41ec1641727fb4b8bcd5ff511e69e5b Mon Sep 17 00:00:00 2001 From: David Mosbach Date: Sun, 13 Aug 2023 20:49:16 +0200 Subject: [PATCH] added flake --- flake.lock | 80 +++++++++++++++++++++++++++++++ flake.lock.license | 4 ++ flake.nix | 61 +++++++++++++++++++++++ workflow-visualiser.cabal | 4 -- workflow-visualiser.cabal.license | 2 + 5 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 flake.lock create mode 100644 flake.lock.license create mode 100644 flake.nix create mode 100644 workflow-visualiser.cabal.license diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f818fe0 --- /dev/null +++ b/flake.lock @@ -0,0 +1,80 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1690933134, + "narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "haskell-flake": { + "locked": { + "lastModified": 1691763544, + "narHash": "sha256-QQsSI5VXm0bBijeGSXXNf4fyw76/XmN67NGbmTCx71s=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "f16e7ac05b1f22b66ef05b7fcc8a96281bb2b749", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "haskell-flake", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1691853136, + "narHash": "sha256-wTzDsRV4HN8A2Sl0SVQY0q8ILs90CD43Ha//7gNZE+E=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f0451844bbdf545f696f029d1448de4906c7f753", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1690881714, + "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9e1960bc196baf6881340d53dccb203a951745a2", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "haskell-flake": "haskell-flake", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.lock.license b/flake.lock.license new file mode 100644 index 0000000..1d83a98 --- /dev/null +++ b/flake.lock.license @@ -0,0 +1,4 @@ + +SPDX-FileCopyrightText: 2023 David Mosbach + +SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d6dee37 --- /dev/null +++ b/flake.nix @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: 2023 David Mosbach +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +{ + description = "Develop environment for the Workflow Visualiser"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + haskell-flake.url = "github:srid/haskell-flake"; + }; + + outputs = inputs@{ self, nixpkgs, flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = nixpkgs.lib.systems.flakeExposed; + imports = [ inputs.haskell-flake.flakeModule ]; + + perSystem = { self', pkgs, ... }: { + + haskellProjects.default = { + # See https://zero-to-flakes.com/haskell-flake/package-set + basePackages = pkgs.haskellPackages; + + # Extra package information. See https://zero-to-flakes.com/haskell-flake/dependency + # + # Note that local packages are automatically included in `packages` + # (defined by `defaults.packages` option). + # + packages = { + # aeson.source = "1.5.0.0"; # Hackage version override + # shower.source = inputs.shower; + }; + # settings = { + # aeson = { + # check = false; + # }; + # relude = { + # haddock = false; + # broken = false; + # }; + # }; + + devShell = { + enable = true; + mkShellArgs.shellHook = '' + zsh && exit + ''; + + # Programs you want to make available in the shell. + # Default programs can be disabled by setting to 'null' + # tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; + + hlsCheck.enable = true; + }; + }; + + packages.default = self'.packages.workflow-visualiser; + }; + }; +} diff --git a/workflow-visualiser.cabal b/workflow-visualiser.cabal index 7e2aacb..8ef928a 100644 --- a/workflow-visualiser.cabal +++ b/workflow-visualiser.cabal @@ -1,7 +1,3 @@ --- SPDX-FileCopyrightText: 2023 David Mosbach --- --- SPDX-License-Identifier: AGPL-3.0-or-later - cabal-version: 2.4 name: workflow-visualiser version: 0.1.0.0 diff --git a/workflow-visualiser.cabal.license b/workflow-visualiser.cabal.license new file mode 100644 index 0000000..b1bfe50 --- /dev/null +++ b/workflow-visualiser.cabal.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2023 David Mosbach +SPDX-License-Identifier: AGPL-3.0-or-later