From a98d4ff9098cf444197fa7ac9d5a1d600ec32ddd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 23 Sep 2025 22:03:13 +0100 Subject: [PATCH] Create a `sculpin` dev shell Signed-off-by: Oliver Davies --- flake.nix | 11 +++++++++++ nix/sculpin/.envrc | 1 + nix/sculpin/flake.lock | 27 -------------------------- nix/sculpin/flake.nix | 17 ---------------- nix/sculpin/package.nix => sculpin.nix | 2 +- 5 files changed, 13 insertions(+), 45 deletions(-) create mode 100644 nix/sculpin/.envrc delete mode 100644 nix/sculpin/flake.lock delete mode 100644 nix/sculpin/flake.nix rename nix/sculpin/package.nix => sculpin.nix (81%) diff --git a/flake.nix b/flake.nix index a537111..a1871fe 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ buildNpmPackage fetchFromGitHub mkShell + php ; in { @@ -23,6 +24,10 @@ openapi-mock = import ./openapi-mock.nix { inherit buildGoModule fetchFromGitHub; }; + + sculpin = import ./sculpin.nix { + inherit fetchFromGitHub php; + }; }; devShells.${system} = with pkgs; { @@ -45,6 +50,12 @@ self.packages.${system}.openapi-mock ]; }; + + sculpin = mkShell { + packages = [ + self.packages.${system}.sculpin + ]; + }; }; }; } diff --git a/nix/sculpin/.envrc b/nix/sculpin/.envrc new file mode 100644 index 0000000..b3da39d --- /dev/null +++ b/nix/sculpin/.envrc @@ -0,0 +1 @@ +use flake ../..#sculpin diff --git a/nix/sculpin/flake.lock b/nix/sculpin/flake.lock deleted file mode 100644 index f418c37..0000000 --- a/nix/sculpin/flake.lock +++ /dev/null @@ -1,27 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1755615617, - "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "20075955deac2583bb12f07151c2df830ef346b4", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nix/sculpin/flake.nix b/nix/sculpin/flake.nix deleted file mode 100644 index eb0d149..0000000 --- a/nix/sculpin/flake.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - - outputs = - inputs: - let - system = "x86_64-linux"; - pkgs = import inputs.nixpkgs { inherit system; }; - - inherit (pkgs) fetchFromGitHub php; - in - { - packages.${system}.default = (import ./package.nix { - inherit fetchFromGitHub php; - }); - }; -} diff --git a/nix/sculpin/package.nix b/sculpin.nix similarity index 81% rename from nix/sculpin/package.nix rename to sculpin.nix index a550291..9b747ad 100644 --- a/nix/sculpin/package.nix +++ b/sculpin.nix @@ -11,5 +11,5 @@ php.buildComposerProject2 { hash = "sha256-K3wyXRiOIlkfy8Kx8pvIzne+N2XNTxZYyDlunfpQsL8="; }; - vendorHash = "sha256-b5+Jj8YUy5QzZ/VG0YN58vkknFLYwn97pfrvUGmA+Dc="; + vendorHash = "sha256-OGRUkpItPJMCMd/0NGPgP45TlA32kVGEVmY1khrzTg8="; }