@@ -88,7 +88,20 @@ let
88 obelisk-asset-serve-snap = self.callCabal2nix "obelisk-asset-serve-snap" (hackGet ./lib/asset + "/serve-snap") {};
88 obelisk-asset-serve-snap = self.callCabal2nix "obelisk-asset-serve-snap" (hackGet ./lib/asset + "/serve-snap") {};
89 obelisk-backend = self.callCabal2nix "obelisk-backend" (cleanSource ./lib/backend) {};
89 obelisk-backend = self.callCabal2nix "obelisk-backend" (cleanSource ./lib/backend) {};
90 obelisk-cliapp = self.callCabal2nix "obelisk-cliapp" (cleanSource ./lib/cliapp) {};
90 obelisk-cliapp = self.callCabal2nix "obelisk-cliapp" (cleanSource ./lib/cliapp) {};
91− obelisk-command = (self.callCabal2nix "obelisk-command" (cleanSource ./lib/command) {});
91+ obelisk-command = (self.callCabal2nix "obelisk-command" (cleanSource ./lib/command) {}).overrideAttrs
93+ buildInputs = drv.buildInputs ++ [ pkgs.makeWrapper ];
95+ ${drv.postInstall or ""}
97+ cp -r ${./migration} $out/migration;
100+ ${drv.postFixup or ""}
101+ # Make `ob` reference its runtime dependencies.
102+ wrapProgram "$out"/bin/ob --prefix PATH : ${pkgs.lib.makeBinPath (commandRuntimeDeps pkgs)}
92 obelisk-executable-config = executableConfig.haskellPackage self;
105 obelisk-executable-config = executableConfig.haskellPackage self;
93 obelisk-executable-config-inject = executableConfig.platforms.web.inject self;
106 obelisk-executable-config-inject = executableConfig.platforms.web.inject self;
94 obelisk-frontend = self.callCabal2nix "obelisk-frontend" (cleanSource ./lib/frontend) {};
107 obelisk-frontend = self.callCabal2nix "obelisk-frontend" (cleanSource ./lib/frontend) {};
@@ -111,15 +124,7 @@ rec {
111 pathGit = ./.; # Used in CI by the migration graph hash algorithm to correctly ignore files.
124 pathGit = ./.; # Used in CI by the migration graph hash algorithm to correctly ignore files.
112 path = reflex-platform.filterGit ./.;
125 path = reflex-platform.filterGit ./.;
113 obelisk = ghcObelisk;
126 obelisk = ghcObelisk;
114− commandWithMigration = ghcObelisk.obelisk-command.overrideAttrs (drv: {
127+ command = ghcObelisk.obelisk-command;
115− postInstall = (drv.postInstall or "") +
116− ''cp -r ${./migration} $out/migration;'';
118− command = pkgs.runCommand commandWithMigration.name { nativeBuildInputs = [pkgs.makeWrapper]; } ''
120− ln -s '${commandWithMigration}/bin/ob' "$out/bin/ob"
121− wrapProgram "$out"/bin/ob --prefix PATH : ${pkgs.lib.makeBinPath (commandRuntimeDeps pkgs)}
123 shell = pinBuildInputs "obelisk-shell" ([command] ++ commandRuntimeDeps pkgs) [];
128 shell = pinBuildInputs "obelisk-shell" ([command] ++ commandRuntimeDeps pkgs) [];
125 selftest = pkgs.writeScript "selftest" ''
130 selftest = pkgs.writeScript "selftest" ''