added flake
This commit is contained in:
parent
83a25504d7
commit
a3e9764ca2
26
flake.lock
Normal file
26
flake.lock
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1702876093,
|
||||
"narHash": "sha256-LgZ6qc+fNK04ChCXs5vz7GQP93XE2D5pYAkOl5bk8bE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5fcb8660ddddb1ec92ebcfa048f7ef4f11260a27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
38
flake.nix
Normal file
38
flake.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
description = "Insecure mock server for OAuth2";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
name = "oauth2-mock-server";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
stackWrapper = pkgs.symlinkJoin {
|
||||
name = "stack";
|
||||
paths = [ pkgs.stack ];
|
||||
buildInputs = with pkgs; [ makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/stack \
|
||||
--add-flags "--no-install-ghc"
|
||||
'';
|
||||
};
|
||||
buildInputs = [ stackWrapper ] ++ (
|
||||
with pkgs; [ reuse zlib ] ++ (
|
||||
with haskell.packages."ghc927"; [ ghc haskell-language-server ]
|
||||
)
|
||||
);
|
||||
in {
|
||||
|
||||
packages.${system}.${name} = nixpkgs.legacyPackages.${system}.${name};
|
||||
packages.${system}.default = self.packages.${system}.${name};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = buildInputs;
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
17
stack.yaml
17
stack.yaml
@ -9,16 +9,18 @@
|
||||
# to be used for project dependencies. For example:
|
||||
#
|
||||
# resolver: lts-3.5
|
||||
resolver: lts-20.24
|
||||
# resolver: nightly-2015-09-21
|
||||
# resolver: ghc-7.10.2
|
||||
# resolver: ghc-9.4.4
|
||||
#
|
||||
# The location of a snapshot can be provided as a file or url. Stack assumes
|
||||
# a snapshot provided as a file might change, whereas a url resource does not.
|
||||
#
|
||||
# resolver: ./custom-snapshot.yaml
|
||||
# resolver: https://example.com/snapshots/2018-01-01.yaml
|
||||
resolver:
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/0.yaml
|
||||
# resolver:
|
||||
# url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/0.yaml
|
||||
|
||||
# User packages to be built.
|
||||
# Various formats can be used as shown in the example below.
|
||||
@ -35,7 +37,12 @@ packages:
|
||||
# These entries can reference officially published versions as well as
|
||||
# forks / in-progress versions pinned to a git hash. For example:
|
||||
#
|
||||
# extra-deps:
|
||||
extra-deps:
|
||||
# - aeson-2.2.1.0
|
||||
# - servant-0.20.1
|
||||
# - servant-server-0.20
|
||||
# - warp-3.3.31
|
||||
|
||||
# - acme-missiles-0.3
|
||||
# - git: https://github.com/commercialhaskell/stack.git
|
||||
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
|
||||
@ -50,6 +57,8 @@ packages:
|
||||
|
||||
# Control whether we use the GHC we find on the path
|
||||
system-ghc: true
|
||||
nix:
|
||||
enable: false
|
||||
#
|
||||
# Require a specific version of Stack, using version ranges
|
||||
# require-stack-version: -any # Default
|
||||
@ -65,3 +74,5 @@ arch: x86_64
|
||||
#
|
||||
# Allow a newer minor version of GHC than the snapshot specifies
|
||||
# compiler-check: newer-minor
|
||||
#allow-newer: true
|
||||
|
||||
|
||||
@ -6,8 +6,7 @@
|
||||
packages: []
|
||||
snapshots:
|
||||
- completed:
|
||||
sha256: e176944bc843f740e05242fa7a66ca1f440c127e425254f7f1257f9b19add23f
|
||||
size: 712153
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/0.yaml
|
||||
original:
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/0.yaml
|
||||
sha256: e019cd29e3f7f9dbad500225829a3f7a50f73c674614f2f452e21bb8bf5d99ea
|
||||
size: 650253
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/24.yaml
|
||||
original: lts-20.24
|
||||
|
||||
Loading…
Reference in New Issue
Block a user