Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ A command-line interface for Todoist.
> npm install -g @doist/todoist-cli
> ```

### Arch Linux (AUR)

```bash
yay -S todoist-cli-bin
# or
paru -S todoist-cli-bin
```

### Local Setup (for now)

```bash
Expand Down
28 changes: 28 additions & 0 deletions aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Maintainer: Your Name <your.email@example.com>
pkgname=todoist-cli-bin
pkgver=1.13.0
pkgrel=1
pkgdesc='Command-line interface for Todoist'
arch=('any')
url='https://github.com/Doist/todoist-cli'
license=('MIT')
depends=('nodejs>=20')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Declare npm as a build dependency

This PKGBUILD runs npm in package(), but it only declares nodejs in depends and no makedepends. In Arch clean-chroot builds, only declared deps are installed for the build; because npm is packaged separately, this can fail immediately with npm: command not found. Add npm to makedepends so the packaging step has the required tool.

Useful? React with 👍 / 👎.

provides=('todoist-cli')
conflicts=('todoist-cli')
source=("https://registry.npmjs.org/@doist/todoist-cli/-/todoist-cli-${pkgver}.tgz")
sha256sums=('2b7864c3170d8515be1411e23ef995054805c58cd30a42b08299a3cc895e0b56')
noextract=("todoist-cli-${pkgver}.tgz")

package() {
npm install -g \
--prefix "${pkgdir}/usr" \
--cache "${srcdir}/npm-cache" \
"${srcdir}/todoist-cli-${pkgver}.tgz"
Comment on lines +17 to +20
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid network dependency resolution in package()

Running npm install -g on the tarball here causes npm to fetch transitive dependencies during package(), which are not declared in source/checksums and will fail in offline or egress-restricted builders. Since this package has runtime dependencies and no bundled modules, builds become non-reproducible and can break depending on registry access. Package from pre-vendored sources (or otherwise avoid dependency downloads during package()).

Useful? React with 👍 / 👎.


# Fix permissions
chmod -R go-w "${pkgdir}/usr"

# Non-deterministic files
find "${pkgdir}" -name 'package.json' -exec sed -i '/_where/d' {} +
find "${pkgdir}" -name '.package-lock.json' -delete
}