Create an openapi dev shell

Move the openapi flake to the root level and refactor to a devshell
called `openapi`.

The other flake.nix files will be similarly combined in future commits.

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-09-23 21:48:00 +01:00
parent c7aaa19534
commit 92c10ef33e
5 changed files with 10 additions and 8 deletions

View file

@ -1 +1 @@
use flake
use flake ..#openapi

27
openapi/flake.lock generated
View file

@ -1,27 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1758277210,
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,31 +0,0 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ nixpkgs, self, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
packages.${system} = {
openapi-generate-html = import ./openapi-generate-html.nix {
inherit (pkgs) buildNpmPackage fetchFromGitHub;
};
openapi-mock = import ./openapi-mock.nix {
inherit (pkgs) buildGoModule fetchFromGitHub;
};
};
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
openapi-generator-cli
openapi-tui
self.packages.${system}.openapi-generate-html
self.packages.${system}.openapi-mock
];
};
};
}

View file

@ -1,17 +0,0 @@
{ buildNpmPackage, fetchFromGitHub }:
buildNpmPackage rec {
pname = "openapi-generate-html";
version = "0.5.3";
src = fetchFromGitHub {
owner = "qazsato";
repo = pname;
rev = "v${version}";
hash = "sha256-+RmwoRhvfkaj/d3EwID7E6noVV+M3h6pe7IEVYyuUwk=";
};
dontNpmBuild = true;
npmDepsHash = "sha256-7yYM43fAR2HLACOQNw7N/t8Lk+17qNfeDKzfb1wx/0U=";
}

View file

@ -1,15 +0,0 @@
{ buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "openapi-mock";
version = "0.3.9";
src = fetchFromGitHub {
owner = "muonsoft";
repo = pname;
rev = "v${version}";
hash = "sha256-7u//uwcVV1/EI6Rr3ju7KOwMYt/dXivyvBWIpTaoWZk=";
};
vendorHash = "sha256-KPCRunuCIbBX+YpHgshixmrxM3Ey0LIdEC0Z4CtpQoI=";
}