about summary refs log tree commit diff
path: root/pkgs/by-name/ch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ch')
-rw-r--r--pkgs/by-name/ch/charmcraft/package.nix88
-rw-r--r--pkgs/by-name/ch/chemacs2/package.nix48
-rw-r--r--pkgs/by-name/ch/chess-tui/package.nix6
-rw-r--r--pkgs/by-name/ch/chezmoi/package.nix53
-rw-r--r--pkgs/by-name/ch/chrysalis/package.nix2
5 files changed, 192 insertions, 5 deletions
diff --git a/pkgs/by-name/ch/charmcraft/package.nix b/pkgs/by-name/ch/charmcraft/package.nix
new file mode 100644
index 0000000000000..c837563a61c8b
--- /dev/null
+++ b/pkgs/by-name/ch/charmcraft/package.nix
@@ -0,0 +1,88 @@
+{
+  lib,
+  git,
+  python3Packages,
+  fetchFromGitHub,
+  nix-update-script,
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "charmcraft";
+  version = "2.6.0";
+
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "canonical";
+    repo = "charmcraft";
+    rev = "refs/tags/${version}";
+    hash = "sha256-B0ZcOORW6yaSIpisPLnq5/S/CcqqvHNTXcfP1sKW2KQ=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace-fail 'version=determine_version()' 'version="${version}"'
+  '';
+
+  propagatedBuildInputs = with python3Packages; [
+    craft-cli
+    craft-parts
+    craft-providers
+    craft-store
+    distro
+    humanize
+    jinja2
+    jsonschema
+    pydantic_1
+    python-dateutil
+    pyyaml
+    requests
+    requests-toolbelt
+    requests-unixsocket
+    snap-helpers
+    tabulate
+    urllib3
+  ];
+
+  nativeBuildInputs = with python3Packages; [
+    pythonRelaxDepsHook
+    setuptools
+  ];
+
+  pythonRelaxDeps = [
+    "urllib3"
+  ];
+
+  nativeCheckInputs = with python3Packages; [
+    pyfakefs
+    pytest-check
+    pytest-mock
+    pytest-subprocess
+    pytestCheckHook
+    responses
+  ] ++ [ git ];
+
+  preCheck = ''
+    mkdir -p check-phase
+    export HOME="$(pwd)/check-phase"
+  '';
+
+  pytestFlagsArray = [ "tests/unit" ];
+
+  disabledTests = [
+    # Relies upon the `charm` tool being installed
+    "test_validate_missing_charm"
+  ];
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = {
+    mainProgram = "charmcraft";
+    description = "Build and publish Charmed Operators for deployment with Juju";
+    homepage = "https://github.com/canonical/charmcraft";
+    changelog = "https://github.com/canonical/charmcraft/releases/tag/${version}";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ jnsgruk ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/by-name/ch/chemacs2/package.nix b/pkgs/by-name/ch/chemacs2/package.nix
new file mode 100644
index 0000000000000..4b85dbfe87142
--- /dev/null
+++ b/pkgs/by-name/ch/chemacs2/package.nix
@@ -0,0 +1,48 @@
+{
+  lib,
+  fetchFromGitHub,
+  stdenvNoCC,
+  unstableGitUpdater,
+}:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "chemacs2";
+  version = "0-unstable-2023-01-20";
+
+  src = fetchFromGitHub {
+    owner = "plexus";
+    repo = "chemacs2";
+    rev = "c2d700b784c793cc82131ef86323801b8d6e67bb";
+    hash = "sha256-/WtacZPr45lurS0hv+W8UGzsXY3RujkU5oGGGqjqG0Q=";
+  };
+
+  outputs = [ "out" "doc" ];
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -t $out/share/site-lisp/chemacs2/ -Dm644 init.el early-init.el chemacs.el
+    install -t $doc/share/doc/chemacs2/ -Dm644 README.org CHANGELOG.md
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = unstableGitUpdater { };
+
+  meta = {
+    homepage = "https://github.com/plexus/chemacs2";
+    description = "Emacs version switcher, improved";
+    longDescription = ''
+      Chemacs 2 is an Emacs profile switcher, it makes it easy to run multiple
+      Emacs configurations side by side.
+
+      Think of it as a bootloader for Emacs.
+    '';
+    license = with lib.licenses; [ gpl3Plus ];
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/pkgs/by-name/ch/chess-tui/package.nix b/pkgs/by-name/ch/chess-tui/package.nix
index d37e1956bc8f1..63ff6b8fc3e78 100644
--- a/pkgs/by-name/ch/chess-tui/package.nix
+++ b/pkgs/by-name/ch/chess-tui/package.nix
@@ -5,16 +5,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "chess-tui";
-  version = "1.2.0";
+  version = "1.2.1";
 
   src = fetchFromGitHub {
     owner = "thomas-mauran";
     repo = "chess-tui";
     rev = "${version}";
-    hash = "sha256-If2xShHuqdCeasP12ZzwvGJSIKFmqJs0Hv1fBhJKoU4=";
+    hash = "sha256-LtxaZ/7p/lqStoUmckVVaegQp02Ci3L46fMFEgledj4=";
   };
 
-  cargoHash = "sha256-TT4lVAttlT3knufMslSVxInn9QM0QJ9jyklzwhRikWA=";
+  cargoHash = "sha256-RUnT5b9pBcopTPT/1J48xZ4pfn3C0mIuYTDvgf3zvn0=";
 
   meta = with lib;{
     description = "A chess TUI implementation in rust";
diff --git a/pkgs/by-name/ch/chezmoi/package.nix b/pkgs/by-name/ch/chezmoi/package.nix
new file mode 100644
index 0000000000000..b808e09206437
--- /dev/null
+++ b/pkgs/by-name/ch/chezmoi/package.nix
@@ -0,0 +1,53 @@
+{
+  lib,
+  buildGoModule,
+  fetchFromGitHub,
+  installShellFiles,
+}:
+
+let
+  argset = {
+    pname = "chezmoi";
+    version = "2.48.0";
+
+    src = fetchFromGitHub {
+      owner = "twpayne";
+      repo = "chezmoi";
+      rev = "v${argset.version}";
+      hash = "sha256-TclY4O5mA14cI7+qvGwt5jSHftxhGaa3ICVn8qdrKqs=";
+    };
+
+    vendorHash = "sha256-qoXfneNEAsvUgaEFHPF1bf/S8feFX+8HtwQy7nzy8Bo=";
+
+    nativeBuildInputs = [
+      installShellFiles
+    ];
+
+    ldflags = [
+      "-s"
+      "-w"
+      "-X main.version=${argset.version}"
+      "-X main.builtBy=nixpkgs"
+    ];
+
+    doCheck = false;
+
+    postInstall = ''
+      installShellCompletion --bash --name chezmoi.bash completions/chezmoi-completion.bash
+      installShellCompletion --fish completions/chezmoi.fish
+      installShellCompletion --zsh completions/chezmoi.zsh
+    '';
+
+    subPackages = [ "." ];
+
+    meta = {
+      homepage = "https://www.chezmoi.io/";
+      description = "Manage your dotfiles across multiple machines, securely";
+      changelog = "https://github.com/twpayne/chezmoi/releases/tag/${argset.src.rev}";
+      license = lib.licenses.mit;
+      mainProgram = "chezmoi";
+      maintainers = with lib.maintainers; [ AndersonTorres ];
+    };
+  };
+in
+buildGoModule argset
diff --git a/pkgs/by-name/ch/chrysalis/package.nix b/pkgs/by-name/ch/chrysalis/package.nix
index ab4b5b5f3f8f1..dcd469b49681f 100644
--- a/pkgs/by-name/ch/chrysalis/package.nix
+++ b/pkgs/by-name/ch/chrysalis/package.nix
@@ -22,8 +22,6 @@ in appimageTools.wrapType2 rec {
   # to allow non-root modifications to the keyboards.
 
   extraInstallCommands = ''
-    mv $out/bin/{${name},${pname}}
-
     install -m 444 \
       -D ${appimageContents}/usr/lib/chrysalis/resources/static/udev/60-kaleidoscope.rules \
       -t $out/lib/udev/rules.d