Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jul 26, 2024
1 parent ad78e4e commit 26c8e3c
Show file tree
Hide file tree
Showing 351 changed files with 226,240 additions and 27 deletions.
47 changes: 30 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,39 @@
let
pkgs = import nixpkgs { inherit system; };

versionSuffix = 0;

api_1_36 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.36.yaml";
hash = "sha256-6kS2MJunowLqAEhdCqi+lXLHsGb9dr2M51fuG+ENX0Q=";
};
api_1_37 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.37.yaml";
hash = "sha256-TSOJs7T7EDkehQIqRa7U59miFdxH72YIn8ynBx2uUOI=";
};
api_1_38 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.38.yaml";
hash = "sha256-5eHhNFiO4YXVhl045OldlL8Mry72LybHzuAtJT1dfMc=";
};
api_1_39 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.39.yaml";
hash = "sha256-Oswl1SJb2MCVpTQ/P9Cj+l1gM8d7E7IXxzffmeavhFM=";
};
api_1_40 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.40.yaml";
hash = "sha256-7AOKrQhc1wzFNnMEIk8grt0DK+KtWLTkrrqwAqiKlQo=";
};
api_1_41 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.41.yaml";
hash = "sha256-bTE0P7dTdIILMxuPy0lm07fB6azn42SxkrLFhramEjE=";
};
api_1_42 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.42.yaml";
hash = "sha256-qaILCCvjwXoPf4R7SHEhsTmronF4h7BtsLChP3pHJBI=";
};
api_1_43 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
hash = pkgs.lib.fakeHash;
url = "https://docs.docker.com/reference/engine/v1.43.yaml";
hash = "sha256-R29jmbUjGsOOJl7uITl2vgcifGWhKUmuK4p32Xz+Vbc=";
};
api_1_44 = pkgs.fetchurl {
url = "https://docs.docker.com/reference/engine/v1.44.yaml";
Expand All @@ -46,7 +48,18 @@

mkGenerateScript = apiYaml: dir: pkgs.writeShellScriptBin "generate.sh" ''
mkdir -p "${dir}"
${pkgs.openapi-generator-cli}/bin/openapi-generator-cli generate --generator-name haskell-http-client -i ${apiYaml} -o "${dir}"
${pkgs.openapi-generator-cli}/bin/openapi-generator-cli generate \
--generator-name haskell-http-client \
-i ${apiYaml} \
-o "${dir}"
# Fill in the package version
PACKAGE_VERSION="${builtins.replaceStrings ["_"] ["."] (builtins.substring 1 (-1) dir)}.${toString versionSuffix}"
${pkgs.gnused}/bin/sed -i "s/^version:\s*\(.*\)/version: $PACKAGE_VERSION/" "${dir}/docker-engine.cabal"
# Remove some unnecessary files
rm "${dir}/openapi.yaml"
rm "${dir}/.travis.yml"
'';

in
Expand Down
5 changes: 5 additions & 0 deletions generate_all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env sh

SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPTDIR"

rm -rf ./v*

nix run .#generate1_36
nix run .#generate1_37
nix run .#generate1_38
Expand Down
22 changes: 16 additions & 6 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
resolver: lts-21.0
build:
haddock-arguments:
haddock-args:
- "--odir=./docs"
resolver: lts-22.30

nix:
pure: false
packages:
- zlib

packages:
- '.'
# - './v1.36'
# - './v1.37'
# - './v1.38'
# - './v1.39'
# - './v1.40'
# - './v1.41'
# - './v1.42'
# - './v1.43'
- './v1.44'
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
sha256: 1b4c2669e26fa828451830ed4725e4d406acc25a1fa24fcc039465dd13d7a575
size: 714100
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/6.yaml
original: lts-22.6
sha256: 795b7a893148a42f09956611a0fa1139293fe6ef934d053468d8e53e3e013390
size: 719577
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/30.yaml
original: lts-22.30
8 changes: 8 additions & 0 deletions v1.36/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.stack-work
src/highlight.js
src/style.css
dist
dist-newstyle
cabal.project.local
.cabal-sandbox
cabal.sandbox.config
23 changes: 23 additions & 0 deletions v1.36/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
39 changes: 39 additions & 0 deletions v1.36/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
Setup.hs
docker-engine.cabal
git_push.sh
lib/DockerEngine.hs
lib/DockerEngine/API.hs
lib/DockerEngine/API/ApiDefault.hs
lib/DockerEngine/API/Config.hs
lib/DockerEngine/API/Container.hs
lib/DockerEngine/API/Distribution.hs
lib/DockerEngine/API/Exec.hs
lib/DockerEngine/API/Image.hs
lib/DockerEngine/API/Network.hs
lib/DockerEngine/API/Node.hs
lib/DockerEngine/API/Plugin.hs
lib/DockerEngine/API/Secret.hs
lib/DockerEngine/API/Service.hs
lib/DockerEngine/API/SessionExperimental.hs
lib/DockerEngine/API/Swarm.hs
lib/DockerEngine/API/System.hs
lib/DockerEngine/API/Task.hs
lib/DockerEngine/API/Volume.hs
lib/DockerEngine/Client.hs
lib/DockerEngine/Core.hs
lib/DockerEngine/Logging.hs
lib/DockerEngine/LoggingKatip.hs
lib/DockerEngine/LoggingMonadLogger.hs
lib/DockerEngine/MimeTypes.hs
lib/DockerEngine/Model.hs
lib/DockerEngine/ModelLens.hs
openapi.yaml
stack.yaml
tests/ApproxEq.hs
tests/Instances.hs
tests/PropMime.hs
tests/Test.hs
1 change: 1 addition & 0 deletions v1.36/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.6.0
Loading

0 comments on commit 26c8e3c

Please sign in to comment.