New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
antares: init at 0.7.22 #299465
antares: init at 0.7.22 #299465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash the commits according to the contributing guidelines.
@AndersonTorres should I do something like |
Ideally you should do this right after compilation, since the idea is to not install these. P.S.: use |
a711d05
to
de639cb
Compare
@AndersonTorres overriding the InstallPhase breaks the app. So I reverted it. |
This is strange. The buildPhase is not meant to populate the installation dir. Can you show the log? |
91abd0d
to
18c09f7
Compare
package.nix{ fetchFromGitHub
, lib
, buildNpmPackage
, electron
, nodejs
}:
buildNpmPackage rec {
pname = "antares";
version = "0.7.22";
src = fetchFromGitHub {
owner = "antares-sql";
repo = "antares";
rev = "v${version}";
hash = "sha256-SYnhrwxoyVw+bwfN1PGMsoul+mTfi8UkiP0fNOvVTBc=";
};
npmDepsHash = "sha256-5khFw8Igu2d5SYLh7OiCpUDMOVH5gAje+VnvoESQboo=";
buildInputs = [ nodejs ];
# Compile it since it uses Typescript
buildPhase = ''
runHook preBuild
npm run compile
runHook postBuild
'';
installPhase = ''
runHook preInstall
find -name "*.ts" | xargs rm -f
mkdir -p $out/lib/node_modules/antares
cp -r dist/* $out/lib/node_modules/antares
mkdir -p $out/bin
makeWrapper ${electron}/bin/electron $out/bin/antares \
--add-flags $out/lib/node_modules/antares/main.js
runHook postInstall
'';
# postInstall = ''
# '';
dontNpmBuild = true;
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
meta = with lib; {
description = "Modern, fast and productivity driven SQL client with a focus in UX";
homepage = "https://github.com/antares-sql/antares";
license = licenses.mit;
maintainers = with maintainers; [ eymeric ];
platforms = platforms.all;
};
} logs
|
the missing file is |
@AndersonTorres do you have any idea on why this is happening? |
No idea. Maybe it lacks an NPM package? |
@AndersonTorres I found how to fix it. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/3800 |
Description of changes
Package Antares, an SQL client.
Things done
I package Antares.
It is an electron app using typescript and vue.
So nix has to compile the ts to JS.
However, I think my method is not perfect because in the end, the output directory has the .ts and the .js.
But only the .js are needed.
If anyone has an idea on how to do it cleaner, it will be helpful.
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.