coder / cursor-arm

Cursor built for ARM Linux and Windows
https://cursor.com
MIT License
43 stars 1 forks source link

How to add to my devShell? #5

Open quinm0 opened 2 weeks ago

quinm0 commented 2 weeks ago

I'm trying to set up a dev shell that can run the cursor-arm command to open the app. How would I go about adding this to my dev env flake? Right now it looks like this.

Sorry if it's a annoying question, flakes are an enigma

{
  description = "Development environment with bun";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # You can change this to a stable channel if preferred
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
  flake-utils.lib.eachDefaultSystem (system:
  let
    pkgs = nixpkgs.legacyPackages.${system};
  in
  {
    devShell = pkgs.mkShell {
      buildInputs = with pkgs; [
        bun
      ];

      shellHook = ''
        echo "Welcome to the Nix g++ development environment!"
      '';
    };
  });
}
quinm0 commented 2 weeks ago

I ended up doing this for now

{
  description = "Development environment";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # You can change this to a stable channel if preferred
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
  flake-utils.lib.eachDefaultSystem (system:
  let
    pkgs = nixpkgs.legacyPackages.${system};
  in
  {
    devShell = pkgs.mkShell {
      buildInputs = with pkgs; [
        bun
      ];

      shellHook = ''
        alias code="nix run github:coder/cursor-arm"
        echo "Welcome to the Nix g++ development environment!"
      '';
    };
  });
}