nixpkgs/pkgs/tools/misc/gigalixir/default.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00

66 lines
1.4 KiB
Nix

{ stdenv
, lib
, python3
, fetchPypi
, git
}:
python3.pkgs.buildPythonApplication rec {
pname = "gigalixir";
version = "1.12.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-T16+0F28/SxDl53GGTRzKbG+ghbL/80NkY08WpCixhA=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'," "" \
--replace "cryptography==" "cryptography>="
'';
propagatedBuildInputs = with python3.pkgs; [
click
pygments
pyopenssl
qrcode
requests
rollbar
stripe
];
nativeCheckInputs = [
git
] ++ (with python3.pkgs; [
httpretty
pytestCheckHook
sure
]);
disabledTests = [
# Test requires network access
"test_rollback_without_version"
# These following test's are now depraced and removed, check out these commits:
# https://github.com/gigalixir/gigalixir-cli/commit/00b758ed462ad8eff6ff0b16cd37fa71f75b2d7d
# https://github.com/gigalixir/gigalixir-cli/commit/76fa25f96e71fd75cc22e5439b4a8f9e9ec4e3e5
"test_create_config"
"test_delete_free_database"
"test_get_free_databases"
];
pythonImportsCheck = [
"gigalixir"
];
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Gigalixir Command-Line Interface";
homepage = "https://github.com/gigalixir/gigalixir-cli";
license = licenses.mit;
maintainers = [ ];
mainProgram = "gigalixir";
};
}